This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients alexandre.vassalotti, belopolsky, docs@python, eltoder, georg.brandl, pitrou, r.david.murray, serhiy.storchaka
Date 2016-05-07.19:02:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1462647761.59.0.692613008726.issue12290@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-05-07 19:02:41serhiy.storchakasetrecipients: + serhiy.storchaka, georg.brandl, belopolsky, pitrou, alexandre.vassalotti, r.david.murray, docs@python, eltoder
2016-05-07 19:02:41serhiy.storchakasetmessageid: <1462647761.59.0.692613008726.issue12290@psf.upfronthosting.co.za>
2016-05-07 19:02:41serhiy.storchakalinkissue12290 messages
2016-05-07 19:02:41serhiy.storchakacreate