minor fix

This commit is contained in:
Miroslav Stampar 2011-05-11 09:40:11 +00:00
parent 53065ee1fb
commit 402c623119
2 changed files with 8 additions and 4 deletions

View File

@ -467,8 +467,10 @@ class OrderedSet(MutableSet):
return len(self) == len(other) and list(self) == list(other)
return set(self) == set(other)
def __del__(self):
self.clear() # remove circular references
# causing "Exception TypeError: TypeError('list indices must be integers, not NoneType',)"
# in garbage collection phase
#def __del__(self):
#self.clear() # remove circular references
if __name__ == '__main__':
print(OrderedSet('abracadaba'))

View File

@ -76,7 +76,9 @@ class OrderedSet(MutableSet):
return len(self) == len(other) and list(self) == list(other)
return set(self) == set(other)
def __del__(self):
self.clear() # remove circular references
# causing "Exception TypeError: TypeError('list indices must be integers, not NoneType',)"
# in garbage collection phase
#def __del__(self):
#self.clear() # remove circular references
oset = OrderedSet