[IronPython] Problem with keyword parameters for built-in types

John Doty jddoty at gmail.com
Thu Nov 3 23:15:07 CET 2005

I'm sorry if this is a known limitation, but the following doesn't work with
IronPython 0.9.3:

class MyClass:
def __init__(self, testValue):
self.testValue = testValue

def _getValue(self):
return self.testValue
value = property(_getValue, doc="This is documentation")

obj = MyClass("Hello!")
print obj.value

It generates the following exception:

Traceback (most recent call last):
at __main__.Initialize() in C:\IronPython\test.py:line 1
at __main__.MyClass$maker0() in C:\IronPython\test.py:line 7
TypeError: can't set arbitrary attributes on built-in type property

I just thought I'd point it out.

(In addition, running this in IronPythonConsole.exe 0.9.4 gives me an
unhandled exception, as opposed to the nice exception-with-stack-trace that
I used to get, and expect from CPython development. Is this on purpose?)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20051103/41d4ca64/attachment.html>

More information about the Ironpython-users mailing list