This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients benjamin.peterson, pitrou
Date 2011-08-16.23:13:13
SpamBayes Score 0.00023820132
Marked as misclassified No
Message-id <1313536266.3531.1.camel@localhost.localdomain>
In-reply-to <1313536173.74.0.884942372339.issue12766@psf.upfronthosting.co.za>
Content
> This sort of thing is true of any slotted class with class attributes:
> 
> >>> class X:
> ...     __slots__ = ()
> ...     foo = None
> ... 
> >>> X().foo = "hello"
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> AttributeError: 'X' object attribute 'foo' is read-only

But that's quite different. In your example, the attribute can't be set
on the instance, while it should be in mine (since 'foo' is amongst the
__slots__).
History
Date User Action Args
2011-08-16 23:13:14pitrousetrecipients: + pitrou, benjamin.peterson
2011-08-16 23:13:13pitroulinkissue12766 messages
2011-08-16 23:13:13pitroucreate