osdir.com


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

Python3 - How do I import a class from another file


Dennis,

> "del instance" only deletes the NAME.
[snip]

Yep, I already assumed that that would happen.  Just wanted to keep it 
simple.

> "instance" xyz does not shadow "class" xyz... instead, the name "xyz"
> only exists in the binding to the instance.

That is what I tried to say: the name-binding to the class is removed.

> However, that instance has a binding to the class object,

And than when the instance is deleted the binding to the class is lost, and 
as a result it is garbage-collected.  Right ?

Regards,
Rudy Wieser