Whre is my object ??

Steven Taschuk staschuk at telusplanet.net
Wed Jun 4 14:17:48 EDT 2003


Quoth King Kuta (in private email, for some reason):
  [...]
> This means that, theoretically, the "object" will be garbage-collected
> because (and that's the catch!) the fact that the istance is stored in a
> list DOES NOT bind the instance to a variable name in a scope.
>   
> Therfore my question: will my object be garbage-collected?
>   
> I still think it will.

No, it won't.  Only a profoundly useless form of garbage
collection would collect objects which are still accessible.  That
you expect otherwise is extremely bizarre.

Do you know what garbage collection is?

If you don't, please ask -- in the newsgroup, if you please, not
in private email -- and one or more of us will probably explain
it.  We're good that way.

> I bet I will better go ahead and test the code as I thought I would NOT
> work. Who knows, Python is full of surprises :-)

Yes, you ought to try it.  There's no reason not to, and doing so
*before* posting your expectations to Usenet might save you some
embarrassment.

No, Python is not full of surprises, unless you come to it with a
batch of strange ideas.

-- 
Steven Taschuk             "[W]e must be very careful when we give advice
staschuk at telusplanet.net    to younger people: sometimes they follow it!"
                             -- "The Humble Programmer", Edsger Dijkstra





More information about the Python-list mailing list