diff --git a/extra/oset/_abc.py b/extra/oset/_abc.py index b155c7474..228e526fa 100644 --- a/extra/oset/_abc.py +++ b/extra/oset/_abc.py @@ -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')) diff --git a/extra/oset/pyoset.py b/extra/oset/pyoset.py index e77707d59..ea3d3709f 100644 --- a/extra/oset/pyoset.py +++ b/extra/oset/pyoset.py @@ -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