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/136791.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 16:31:12 CET 2014
On Mon, 27 Oct 2014 16:20:06 +0100
Stefan Richthofer <stefan.richthofer at gmx.de> wrote:
> 
> I already pointed out
> "One can surely argue x2 has never been dead, or see it as
> "it was killed along with x and then resurrected by x"."
> 
> In Java and thus in Jython, it is treated as the second one.

You mean Jython deletes instance attributes before calling __del__ ?
That would make most __del__ implementations quite useless...
And actually your own example would fail with an AttributeError on
"X.y = self.z".

> What would still be interesting (at least when Jython 3 is born),
> is which of the mentioned behaviors occurs if it is
> performed by CPython's cyclic gc (consistently the first one I would guess).

In which use case exactly? :-) I've lost track a bit, since you've
posted several examples...

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