osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Python3 - How do I import a class from another file


On 11/12/2019 21:32, musbur at posteo.org wrote:
> On Tue, 10 Dec 2019 14:56:10 -0500
> Dennis Lee Bieber<wlfraed at 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