The untimely dimise of a weak-reference

Vincent van Beveren V.vanBeveren at
Mon Aug 2 08:46:13 CEST 2010

Hi Christiaan,

> Instances of a class have no means of storing the bound method object.
> The or unbound bound method is a simple and small wrapper that keeps a
> reference to the class, "self" and the function object. Python keeps a
> pool of empty method objects in a free list. The creation of a new bound
> method just takes a few pointer assignments and three INCREFs.

Okay, that also explains the consistent memory assignment. Maybe I'll create a bound-method caching object, see how slow/fast it is in comparison, and see what ever other issues I run into.

-----Original Message-----
From: at [ at] On Behalf Of Christian Heimes
Sent: vrijdag 30 juli 2010 16:44
To: python-list at
Subject: Re: The untimely dimise of a weak-reference

Am 30.07.2010 16:06, schrieb Vincent van Beveren:
> I did not know the object did not keep track of its bound methods. What advantage is there in creating a new bound method object each time its referenced? It seems kind of expensive.


More information about the Python-list mailing list