Ejemplo n.º 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))
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)