Serhiy Storchaka added the comment:

Actually this wording is not quite correct. __setstate__() is called for any 
pickled state. It is not called only if the state is not pickled. The state is 
not pickled if reducing method (__reduce_ex__ or __reduce__) doesn't return 
state or returns None as a state. Default reducing method for protocol 0 and 1 
doesn't return a state if __getstate__() returns false value.

There are many other details of pickle protocol that are not correctly 
documented in the documentation of the pickle module. PEP 307 documents pickle 
protocol more correctly.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12290>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to