Hello Stefan,

On Sun, 26 Oct 2014 00:20:47 +0200
"Stefan Richthofer" <stefan.richtho...@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.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to