[Python-Dev] Let's get rid of unbound methods

Glyph Lefkowitz glyph at divmod.com
Wed Jan 5 16:41:30 CET 2005


On Wed, 2005-01-05 at 12:11 +0100, Alex Martelli wrote:

> Hmmm, seems to me we'd need copies of the function object for this 
> purpose:

For the stated use-case of serialization, only one copy would be
necessary, and besides - even *I* don't use idioms as weird as the one
you are suggesting very often ;).

I think it would be reasonable to assign im_class only to functions
defined in class scope.  The only serialization that would break in that
case is if your example had a 'del f' at the end.




More information about the Python-Dev mailing list