[IronPython] __slots__ and __str__/__repr__
Dino Viehland
dinov at exchange.microsoft.com
Wed Jul 5 14:09:38 PDT 2006
Thanks again for the bug report. I've opened bug 797 to track this one
http://www.codeplex.com/WorkItem/View.aspx?ProjectName=IronPython&WorkItemId=797
Is this currently blocking you? The reason I ask is we're only differing by a couple of things (the property name being the obviously most egregious one) and it'd be nice to have an idea how we should prioritize this.
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Simon Dahlbacka
Sent: Wednesday, July 05, 2006 12:29 PM
To: Discussion of IronPython
Subject: [IronPython] __slots__ and __str__/__repr__
CPython2.4.1
>>>class foo(object):
... __slots__ = ["bar"]
...
>>>foo.bar
<member 'foo' of 'foo' objects>
>>> f = foo()
>>> f.bar
Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: bar
Ironpython beta8
>>>class foo(object):
... __slots__ = ["bar"]
>>>foo.bar
<property# foo on Object_1>
>>> f = foo()
>>> f.bar
Traceback (most recent call last):
File , line 0, in <stdin>##42
File , line 0, in get_bar##43
AttributeError: '<class '__main__.foo'>' object has no attribute 'bar'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/users-ironpython.com/attachments/20060705/26b6d868/attachment.htm
More information about the users
mailing list