[Python-Dev] weakref enhancements

tomer filiba 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.


-tomer

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
> the
> object, not to the object.
>
>
> Raymond
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20060928/80869972/attachment.html 


More information about the Python-Dev mailing list