more graceful fix related to the last commit

This commit is contained in:
Miroslav Stampar 2011-05-11 09:42:35 +00:00
parent 402c623119
commit 48ac9911c0
2 changed files with 6 additions and 8 deletions

View File

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

View File

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