From b39cb3e7e6abf05a5c0227cd3fddecefc1107b55 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Tue, 1 Nov 2011 00:04:35 -1000 Subject: [PATCH] need to return -1 from __cmp__ to return "less than" --- materials.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/materials.py b/materials.py index 2d9965c..801d3d8 100644 --- a/materials.py +++ b/materials.py @@ -31,7 +31,7 @@ class Block(object): return str(self) def __cmp__(self, other): - if not isinstance(other, Block): return False + if not isinstance(other, Block): return -1 key = lambda a:a and (a.ID, a.blockData) return cmp( key(self), key(other))