can only compare Block against another Block (for now)
This commit is contained in:
parent
214c5a547c
commit
41fe391c2a
@ -31,6 +31,7 @@ class Block(object):
|
||||
return str(self)
|
||||
|
||||
def __cmp__(self, other):
|
||||
if not isinstance(other, Block): return False
|
||||
key = lambda a:a and (a.ID, a.blockData)
|
||||
return cmp( key(self), key(other))
|
||||
|
||||
|
Reference in New Issue
Block a user