[Python-Dev] weakref enhancements
tomerfiliba at gmail.com
Thu Sep 28 21:57:32 CEST 2006
> I'm sceptical that these would find use in practice.
> Also, I question the utility of maintaining a weakref to a method or
> attribute instead of holding one for the object or class. As long as
> the enclosing object or class lives, so too will their methods and
> attributes. So what is the point of a tighter weakref granualarity?
i didn't just came up with them "out of boredom", i have had specific
use cases for these, mainly in rpyc3000... but since the rpyc300
code base is still far from completion, i don't want to give examples
at this early stage.
however, these two are theoretically useful, so i refactored them out
of my code into recipes.
On 9/28/06, Raymond Hettinger <python at rcn.com> wrote:
> > Also, I question the utility of maintaining a weakref to a method or
> > attribute instead of holding one for the object or class.
> Strike that paragraph -- the proposed weakattrs have references away from
> object, not to the object.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev