A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-October/136793.html below:

[Python-Dev] results of id() and weakref.getweakrefs() sometimes break on object resurrection

[Python-Dev] results of id() and weakref.getweakrefs() sometimes break on object resurrection [Python-Dev] results of id() and weakref.getweakrefs() sometimes break on object resurrectionAntoine Pitrou solipsis at pitrou.net
Mon Oct 27 17:36:19 CET 2014
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
executed.

If Jython does things differently, then certainly its behaviour is
incompatible with the common expectations of Python developers.

Regards

Antoine.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4