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

Python3 - How do I import a class from another file


This is the first time I've seen you post FUD. :-((

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

I'm rather sure it neither specifies that for any of the other commands. 
Does that mean that it could randomly delay the execution of them too 
(effectivily randomizing the program) and we should all be OK by that ?

I think I will just go out on a limb and just assume that the __del__ method 
/will/ be called as part of a "del instance" request causing the reference 
count to reach zero (directly or indirectly), before the next command is 
executed (circular references excluded - a situation which I assume happens 
by mistake, not on purpose).

Why ?   Because anything else would cause big problems in the predictability 
of the execution of a program.   And I don't think the writers/maintainers 
of the Python language where or are /that/ daft (it would kill their 
language off in no time flat).

But, if anyone has an example of how that presumption will, in regular use 
(non circular references), bite me in the ass than please to post it or 
provide a link.  I do not at all mind being /proven/ wrong.

Rudy Wieser