set.__getstate__ not overriden

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • George Sakkis

    #1

    set.__getstate__ not overriden

    >>> import pickle[color=blue][color=green][color=darkred]
    >>> class Foo(set):[/color][/color][/color]
    .... def __getstate__(se lf): assert False
    [color=blue][color=green][color=darkred]
    >>> pickle.dumps(Fo o())[/color][/color][/color]
    # 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

Working...