[issue17810] Implement PEP 3154 (pickle protocol 4)

Alexandre Vassalotti report at bugs.python.org
Fri May 3 20:39:20 CEST 2013


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 <report at bugs.python.org>
<http://bugs.python.org/issue17810>
_______________________________________


More information about the Python-bugs-list mailing list