Python3 - How do I import a class from another file
R.Wieser
address at not.available
Wed Dec 11 05:43:23 EST 2019
MRAB,
> From the help:
...
> Do not depend on immediate finalization of objects when they become
> unreachable (so you should always close files explicitly).
Do you notice there is not a single word about (the delayed action of) the
__del__ method in there ? Why than do you think its talking about it ?
You know how I read that ? As if its talking about /variables going outof
scope/. Makes sense ? Thought so. :-)
Hmmm... Maybe the __del__ method was created exactly to solve this late
handling of going-outof-scope variables. What do you think ?
And by the way: /when/ would you close those files explicitily ? You
cannot just do it before any "del instance" command, as some other refence
to the instance might still there ...
Regards,
Rudy Wieser
More information about the Python-list
mailing list