Hi Stefan, On 26 October 2014 02:50, Stefan Richthofer <stefan.richtho...@gmx.de> wrote: > It appears weakrefs are only cleared if this is done by gc (where no > resurrection can happen anyway). If a resurrection-performing-__del__ is > just called by ref-count-drop-to-0, weakrefs persist -
How do you reach this conclusion? The following test program seems to show the opposite, by printing None on Python 2.7.6: import weakref class X(object): def __del__(self): print ref() x = X() ref = weakref.ref(x) del x A bientôt, Armin. _______________________________________________ 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