__del__ igners exception in 2.1?

Vassilis Virvilis vasvir at iit.demokritos.gr
Fri Aug 17 09:13:14 EDT 2001


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