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/136751.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
Sun Oct 26 01:22:58 CEST 2014
Hello Stefan,

On Sun, 26 Oct 2014 00:20:47 +0200
"Stefan Richthofer" <Stefan.Richthofer at gmx.de> wrote:
> Hello developers,
> 
> I observed strange behaviour in CPython (tested in 2.7.5 and 3.3.3)
> regarding object resurrection.

Your runGC() function is buggy, it does not run the GC under CPython.
Fix it and the first problem (with id()) disappears.

The second problem (with weakref) is different: weakrefs are cleared
before __del__ is called, so resurrection doesn't affect the whole
process. Add a callback to the weakref and you'll see it is getting
called.

In other words, CPython behaves as expected. Your concern is
appreciated, though.

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