set.__getstate__ not overriden

George Sakkis gsakkis at rutgers.edu
Mon Oct 10 13:47:21 EDT 2005


>>> import pickle
>>> class Foo(set):
...     def __getstate__(self): assert False

>>> pickle.dumps(Foo())
# doesn't raise AssertionError

The same happens with frozenset. Before I submit it to the bugs
tracker, is there a chance this is a 'feature' ?

George




More information about the Python-list mailing list