Víctor Terrón added the comment:

Ramchandra, that is not the behavior that I am able to reproduce. Please see 
the attached example: in the presence of __reduce__(), __getstate__() is not 
being called whether the class or an instance its pickled. This is also in 
consonance with what is stated in the docs, which warn that "Although powerful, 
implementing __reduce__() directly in your classes is error prone. For this 
reason, class designers should use the high-level interface (i.e., 
__getnewargs__(), __getstate__() and __setstate__()) whenever possible".

----------
Added file: http://bugs.python.org/file29513/issue17489_example.py

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

Reply via email to