[Python-Dev] Re: pickle.reduce and deconstruct functions

2020-02-16 Thread Nick Coghlan
I don't have anything to add on the side of the technical specifics, but I do want to point out another benefit of adding these APIs: a significant improvement in testability, since you will be able to test the reduction and reconstruction behaviours directly, rather than having to infer what is go

[Python-Dev] Re: pickle.reduce and deconstruct functions

2020-02-09 Thread Andrew Barnert via Python-Dev
Some additional things that might be worth doing. I believe this exposes enough to allow people to build an object graph walker out of the `pickle`/`copy` protocol without having to access fragile internals, and without restricting future evolution of the internals of the protocol. See [the same