Confusion with __del__

Clarence Gardner clarence at netlojix.com
Sun Feb 10 05:12:33 EST 2002


In article <2jq98.54$Mk5.2196 at newsfeed.avtel.net>,
	clarence at netlojix.com (Clarence Gardner) writes:
> It seems to me that what should happen is:
>     __init__ raises an exception
>     __del__ gets called; it checks whether the "db" attribute exists;
>          it doesn't; object is now deleted
> Why does it call __del__ (or close) a second (or millionth) time? 

Mea culpa. The class has __getattr__ where I meant to put __getitem__.

The separate thread about pair programming, arguing about what the
factor 'k' (denoting productivity improvement of P1 given P2 helping)
doesn't take into account the savings on broken furniture, etc., caused
by the solitary P1 :(

-- 
Clarence Gardner
Software Engineer
NetLojix Communications
clarence at netlojix.com



More information about the Python-list mailing list