A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-November/040303.html below:

[Python-Dev] more on pickling

[Python-Dev] more on pickling [Python-Dev] more on picklingMartin v. Löwis martin at v.loewis.de
Tue Nov 18 01:08:58 EST 2003
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

More information about the Python-Dev mailing list

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