[Python-porting] Pickling unbound methods on Python 3
"Martin v. Löwis"
martin at v.loewis.de
Mon May 31 22:07:42 CEST 2010
> I suppose the easiest way to add the information about the defining
> class is to have the class constructor add a function attribute
> to the (unbound) method functions. This should be the name of
> the defining class to avoid circular references.
>
> As a workaround that'll work, yeah. But we were discussing whether we
> can make a real solution. (Unless you were proposing that Python itself
> will do this and not just my program; In that case I'm totally with you,
> but it seems that the Python community isn't.)
What makes you think so? I (personally) have objected to your hackish
way of scanning the all classes in the module. Adding a function
attribute is fine with me.
I only wonder if it would be useful to generalize this beyond functions.
Regards,
Martin
More information about the Python-porting
mailing list