Hello all,

Can someone reproduce this bug ... I use :

[EMAIL PROTECTED] /home/adam/Work/Python]> python
Python 2.4.3 (#2, Sep 18 2006, 21:07:35)
[GCC 4.1.1 20060724 (prerelease) (4.1.1-3mdk)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>>

First test :

[EMAIL PROTECTED] /home/adam/Work/Python]> cat bug_del.py && echo "------" 
&& python bug_del.py

class XObject(object):

     def __del__(self):
         print "XObject.__del__"
         return

     pass

class A(XObject):

     def __del__(self):
         print "A.__del__"
         XObject.__del__(self)
         return

     pass

a = A()
------
A.__del__
XObject.__del__
[EMAIL PROTECTED] /home/adam/Work/Python]>

Everything is ok ... now I just replace "a = A()" by "aaa = A()":

[EMAIL PROTECTED] /home/adam/Work/Python]> cat bug_del.py && echo "------" 
&& python bug_del.py

class XObject(object):

     def __del__(self):
         print "XObject.__del__"
         return

     pass

class A(XObject):

     def __del__(self):
         print "A.__del__"
         XObject.__del__(self)
         return

     pass

aaa = A()
------
A.__del__
Exception exceptions.AttributeError: "'NoneType' object has no attribute 
'__del__'" in <bound method A.__del__ of <__main__.A object at 
0xb7bb124c>> ignored
[EMAIL PROTECTED] /home/adam/Work/Python]>

!!!


Thanks in advance,

             E.A.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to