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 benjamin.peterson
Recipients benjamin.peterson, pitrou
Date 2011-08-16.23:09:33
SpamBayes Score 0.00011018317
Marked as misclassified No
Message-id <1313536173.74.0.884942372339.issue12766@psf.upfronthosting.co.za>
In-reply-to
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

I think what needs to happen is the error message needs to be improved in both cases.
History
Date User Action Args
2011-08-16 23:09:33benjamin.petersonsetrecipients: + benjamin.peterson, pitrou
2011-08-16 23:09:33benjamin.petersonsetmessageid: <1313536173.74.0.884942372339.issue12766@psf.upfronthosting.co.za>
2011-08-16 23:09:33benjamin.petersonlinkissue12766 messages
2011-08-16 23:09:33benjamin.petersoncreate