コード例 #1
0
ファイル: component_id.py プロジェクト: stscieisenhamer/glue
 def __le__(self, other):
     return InequalitySubsetState(self, other, operator.le)
コード例 #2
0
ファイル: component_id.py プロジェクト: stscieisenhamer/glue
 def __gt__(self, other):
     return InequalitySubsetState(self, other, operator.gt)
コード例 #3
0
ファイル: component_id.py プロジェクト: stscieisenhamer/glue
 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