can only compare Block against another Block (for now)

This commit is contained in:
David Vierra 2011-10-30 20:05:50 -10:00
parent 214c5a547c
commit 41fe391c2a

View File

@ -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))