Alexandre Vassalotti added the comment:

Those methods wouldn't be much more a maintenance burden than the special cases 
already present in the implementation of __reduce__. These methods would only 
need to be provided by classes that wishes to support efficient in-place 
pickling provided by protocol 4. As such, this approach better as it would rely 
on duck typing rather than concrete type checks, which IMHO do not belong in 
the default object implementation.

Plus, having this generic API would allow pickle to share the same pickling and 
unpickling code for lists, dicts, sets and other mutable collections.

----------

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

Reply via email to