__del__ ignors exception in 2.1?
Vassilis Virvilis
vasvir at iit.demokritos.gr
Fri Aug 17 09:15:11 EDT 2001
OK it was somewhat embarrassing so I change the subject line. Please answer to
this post
Vassilis Virvilis wrote:
>
> Try the follwoing snippet:
>
> class bar:
> def __del__(self):
> badsnake()
>
> a=bar()
> del a
> print "It continues"
>
> it spits:
> Exception exceptions.NameError: "global name 'badsnake' is not defined" in
> <method bar.__del__ of bar instance at 0x80cfa1c> ignored
> It continues
>
> Why? Shouldn't the exception make python abort?
More information about the Python-list
mailing list