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.

thanks,
john
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to