[Python-Dev] results of id() and weakref.getweakrefs() sometimes break on object resurrection
stefan.richthofer at gmx.de
Mon Oct 27 18:40:24 CET 2014
I already admitted that it is implementation specific whether one would
talk of resurrection, even in one and the same scenario. (Although
I would prefer to agree on an abstract notion of the resurrection term.)
>If Jython does things differently, then certainly its behaviour is
>incompatible with the common expectations of Python developers.
Guido recently pointed out that it is allowed for different Python
implementations to alter details of gc behavior. (And I suppose this
was more a reminder of already common consensus.)
However I agree that some aspects could be improved and I am looking
at it. So far I have all answers I needed. Thanks for the discussion!
On 10/27/2014 05:36 PM, Antoine Pitrou wrote:
> On Mon, 27 Oct 2014 17:23:23 +0100
> Stefan Richthofer <stefan.richthofer at gmx.de> wrote:
>>> You mean Jython deletes instance attributes before calling __del__ ?
>> No. I think the term of "object resurrection" usually does not mean bringing
>> back a deleted object in the sense that memory was already freed.
>> I think it rather means that nothing referred to an object, so it was on the
>> "kill-list" of gc or zero-ref-count macro.
> "x2" does *not* have its refcount drop to zero, since it is still
> referenced by x. In other words, "x2" can only be on a "kill list"
> after "x" has been finalized, which can only be *after* __del__ was
> If Jython does things differently, then certainly its behaviour is
> incompatible with the common expectations of Python developers.
> Python-Dev mailing list
> Python-Dev at python.org
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/stefan.richthofer%40gmx.de
More information about the Python-Dev