• Guido van Rossum's avatar
    "Fix" for SF bug #520644: __slots__ are not pickled. · 8c842553
    Guido van Rossum authored
    As promised in my response to the bug report, I'm not really fixing
    it; in fact, one could argule over what the proper fix should do.
    Instead, I'm adding a little magic that raises TypeError if you try to
    pickle an instance of a class that has __slots__ but doesn't define or
    override __getstate__.  This is done by adding a bozo __getstate__
    that always raises TypeError.
    
    Bugfix candidate (also the checkin to typeobject.c, of course).
    8c842553
test_descr.py 79.4 KB