Christian Tismer <tismer at tismer.com> writes: > So I have the impression these methods loose their > relationship to their originating object. > Is this behavior by intent, i.e. is it impossible to write > a working __reduce__ method for a bound class method? I don't think it is impossible; see also python.org/sf/558238 However, I would make pickling of bound methods "built-in", i.e. by pickle explicitly recognizing bound methods, or using copy_reg, as Konrad suggests. If you really want to use __reduce__, you probably have to make sure it isn't delegated to the function object. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4