On 11/12/2019 21:32, mus...@posteo.org wrote:
On Tue, 10 Dec 2019 14:56:10 -0500
Dennis Lee Bieber<wlfr...@ix.netcom.com>  wrote:

        It is called when the language IMPLEMENTATION decides to call
it. That time is not specified in the language description/reference
manual.
Yes it is:

"Note: del x doesn’t directly call x.__del__() — the former decrements
the reference count for x by one, and the latter is only called when
x’s reference count reaches zero."

Plain and simple: When the refcount reaches zero.
You are assuming that "when" implies "immediately on the occurence." It doesn't. This happens to be the behaviour in CPython, but other implementations vary as Chris has explained several times now.

--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to