[IronPython] AttributeError problem

Jan Szumiec jan.szumiec at resolversystems.com
Mon Aug 7 12:21:36 CEST 2006


Hi,

We've discovered a bug in 1.0RC1. The behavior between CPython and IP 
differs.

Code:
class AttributeTest(object):
    def __getattr__(self, name):
        print 'hello'
        raise AttributeError('wibble')
       

AttributeTest().fish

IronPython trace:
hello
Traceback (most recent call last):
  File c:\development\Resolver\CSharp\RSIronPython\Engine.cs, line 52, 
in RunPythonFile
  File , line 0, in C:\development\att Test.py##1
AttributeError: fish

CPython trace:
C:\development>"att Test.py"
hello
Traceback (most recent call last):
  File "C:\development\att Test.py", line 7, in ?
    AttributeTest().fish
  File "C:\development\att Test.py", line 4, in __getattr__
    raise AttributeError('wibble')
AttributeError: wibble



More information about the Ironpython-users mailing list