Message265087
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. |
|
Date |
User |
Action |
Args |
2016-05-07 19:02:41 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, georg.brandl, belopolsky, pitrou, alexandre.vassalotti, r.david.murray, docs@python, eltoder |
2016-05-07 19:02:41 | serhiy.storchaka | set | messageid: <1462647761.59.0.692613008726.issue12290@psf.upfronthosting.co.za> |
2016-05-07 19:02:41 | serhiy.storchaka | link | issue12290 messages |
2016-05-07 19:02:41 | serhiy.storchaka | create | |
|