[Python-Dev] weakref enhancements
bob at redivi.com
Fri Sep 29 01:39:08 CEST 2006
On 9/28/06, Raymond Hettinger <rhettinger at ewtllc.com> wrote:
> [Alex Martelli]
> >I've had use cases for "weakrefs to boundmethods" (and there IS a
> >Cookbook recipe for them),
> Weakmethods make some sense (though they raise the question of why bound
> methods are being kept when the underlying object is no longer in use --
> possibly as unintended side-effect of aggressive optimization).
There are *definitely* use cases for keeping bound methods around.
one_of = set([1,2,3,4]).__contains__
More information about the Python-Dev