dang, you posted before me :)
anyway, please check my implementation as well
http://sebulba.wikispaces.com/recipe+weakattr
i also included some demos.
anyway, i'd like to have this or the other weakattr implementation
included in weakref.py. it's a pretty useful feature to have in the stdlib,
fo
Greg Ewing wrote:
> What might be useful is an easier way of *explicitly*
> creating and using weak references.
>
> We already have WeakKeyDictionary and WeakValueDictionary
> which behave just like ordinary dicts except that they
> weakly reference things. I'm thinking it would be nice
> to have
tomer filiba wrote:
> you can solve the problem using
> weakref.proxy
> ...
> so why not do this automatically?
I would *not* want to have some of my references chosen
at random and automatically made into weak ones. I may
temporarily create a cycle and later break it by removing
one of the refer
"tomer filiba" <[EMAIL PROTECTED]> wrote:
> the current gc already detects cyclic referencing between objects,
> and by what i understood, it can free the memory the objects take,
> but __del__ is never call because there's not telling where to
> start the __del__ chain.
Not all cyclic references
the current gc already detects cyclic referencing between objects, and by what i understood, it can free the memory the objects take,but __del__ is never call because there's not telling where tostart the __del__ chain.
by cyclic referencing i mean something like>>> class x(object):... def __in