示例#1
0
 def __le__(self, other):
     return InequalitySubsetState(self, other, operator.le)
示例#2
0
 def __gt__(self, other):
     return InequalitySubsetState(self, other, operator.gt)
示例#3
0
 def __ne__(self, other):
     if isinstance(other, (numbers.Number, six.string_types)):
         return InequalitySubsetState(self, other, operator.ne)
     return other is not self
示例#4
0
def _load_inequality_subset_state(rec, context):
    return InequalitySubsetState(context.object(rec['left']),
                                 context.object(rec['right']),
                                 SYMOP[rec['op']])
示例#5
0
文件: component_id.py 项目: omad/glue
 def __ne__(self, other):
     if np.issubsctype(type(other), np.number):
         return InequalitySubsetState(self, other, operator.ne)
     return other is not self
示例#6
0
 def __eq__(self, other):
     if isinstance(other, (numbers.Number, str)):
         return InequalitySubsetState(self, other, operator.eq)
     return other is self