[IronPython] bug when overriding __delattr__

Ronnie Maor ronnie.maor at gmail.com
Wed Jun 23 14:38:19 CEST 2010


The following code works in CPython 2.6.2, but is broken in both IPy 2.6 and
2.6.1

>>> class A(object):
...     def __delattr__(self,name):
...             object.__delattr__(self,name)
...
>>> a = A()
>>> a.x = 3
>>> del a.x
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 3, in __delattr__
AttributeError: 'A' object has no attribute 'x'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100623/9b278f70/attachment.html>


More information about the Ironpython-users mailing list