Python3 - How do I import a class from another file

R.Wieser address at not.available
Tue Dec 10 12:38:35 EST 2019


Antoon,

> Well yes that is why it is stupid to rely on the garbage collector to do
> those things for you. That is why Greg Ewing already stated:
>
>> If your object has a method for explicitly making it release its
>> resources, it would be better to use that rather than rely on
>> the garbage collector.

I think that you are mistaken to the meaning of word "resources" in the 
above ...

>   foo1 = Bar()
>   foo2 = foo1
>   del foo1
>
> Should the object be cleaned up now or not?

Seriously ?    No, as the object is still being referenced by "foo2".    And 
I do not see you explain anything either. :-(

Also, what has that got to do anything with my example talking about the 
"__del__" method  I posted ?    As far as I can tell ?  Nothing.

Regards,
Rudy Wieser

P.s.
Be sure to read my reply to Chris.




More information about the Python-list mailing list