Le Tue, 19 May 2009 09:12:34 +0200,
"A.T.Hofkamp" <a.t.hofk...@tue.nl> s'exprima ainsi:

> A folder is created during object instantiation.

Do you mean a filesytem directory? I may be wrong, bit it seems there is a bit 
of confusion between things and their representation as python objects.

You shouldn't call __del__, id est try to do garbage collection instead of 
letting python do it. This is for the python object side. But I think (someone 
confirms/contradicts?) there is no harm in overloading a class's __del__ to 
accomplish additional tasks such as deleting temp disk space/dirs/files that 
need to exist only during object creation.
If this looks you what you intend to do, then there are alternatives such as 
using "try...finally" to ensure cleanup (also "with"?).

Sorry if I misunderstood.

Denis
------
la vita e estrany
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to