Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

The pickle protocol should also check that __reduce__ returns iterators
(iterables are not enough).
The code below crashes the interpreter (twice ;-)

class C:
    def __reduce__(self):
        return C, (), None, None, []
class D:
    def __reduce__(self):
        return D, (), None, [], None
import pickle
pickle.dumps(C())
pickle.dumps(D())

----------
nosy: +amaury.forgeotdarc

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4170>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to