Beispiel #1
0
 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))
Beispiel #2
0
 def __cmp__(self, other):
     if self is other:
         return 0
     if not isinstance(other, ImportMap):
         return NotImplemented
     return cmp(self._data, other._data)
Beispiel #3
0
 def __cmp__(self, other):
     if self is other:
         return 0
     if not isinstance(other, ImportSet):
         return NotImplemented
     return cmp(self._importset, other._importset)
Beispiel #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)
Beispiel #5
0
 def __cmp__(self, o):
     if self is o:
         return 0
     if not isinstance(o, Filename):
         return NotImplemented
     return cmp(self._filename, o._filename)
Beispiel #6
0
 def __cmp__(self, other):
     if self is other:
         return 0
     if not isinstance(other, PythonStatement):
         return NotImplemented
     return cmp(self.block, other.block)
Beispiel #7
0
 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)
Beispiel #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)