コード例 #1
0
ファイル: _file.py プロジェクト: metalhead95/pyflyby
 def __cmp__(self, o):
     if self is o:
         return 0
     if not isinstance(o, FileText):
         return NotImplemented
     return cmp((self.filename, self.joined, self.startpos),
                (o.filename, o.joined, o.startpos))
コード例 #2
0
ファイル: _importclns.py プロジェクト: Quansight/pyflyby-old
 def __cmp__(self, other):
     if self is other:
         return 0
     if not isinstance(other, ImportMap):
         return NotImplemented
     return cmp(self._data, other._data)
コード例 #3
0
ファイル: _importclns.py プロジェクト: Quansight/pyflyby-old
 def __cmp__(self, other):
     if self is other:
         return 0
     if not isinstance(other, ImportSet):
         return NotImplemented
     return cmp(self._importset, other._importset)
コード例 #4
0
 def __cmp__(self, other):
     if self is other:
         return 0
     if not isinstance(other, DottedIdentifier):
         return NotImplemented
     return cmp(self.name, other.name)
コード例 #5
0
ファイル: _file.py プロジェクト: metalhead95/pyflyby
 def __cmp__(self, o):
     if self is o:
         return 0
     if not isinstance(o, Filename):
         return NotImplemented
     return cmp(self._filename, o._filename)
コード例 #6
0
ファイル: _parse.py プロジェクト: rahasurana/pyflyby
 def __cmp__(self, other):
     if self is other:
         return 0
     if not isinstance(other, PythonStatement):
         return NotImplemented
     return cmp(self.block, other.block)
コード例 #7
0
ファイル: _parse.py プロジェクト: rahasurana/pyflyby
 def __cmp__(self, other):
     if self is other:
         return 0
     if not isinstance(other, PythonBlock):
         return NotImplemented
     return cmp(self.text, other.text) or cmp(self.flags, other.flags)
コード例 #8
0
 def __cmp__(self, o):
     if self is o:
         return 0
     if not isinstance(o, ModuleHandle):
         return NotImplemented
     return cmp(self.name, o.name)