[IronPython] __slots__ and __str__/__repr__
Simon Dahlbacka
simon.dahlbacka at gmail.com
Wed Jul 5 23:12:35 CEST 2006
no, not at all, I just played around at the console trying to find bugs.. :)
That said, it probably would suck pretty badly if I was using doctest or
something similar..
/S
On 7/6/06, Dino Viehland <dinov at exchange.microsoft.com> wrote:
>
> 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'
>
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060706/bbc370b4/attachment.html>
More information about the Ironpython-users
mailing list