Message142234
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. |
|
Date |
User |
Action |
Args |
2011-08-16 23:09:33 | benjamin.peterson | set | recipients:
+ benjamin.peterson, pitrou |
2011-08-16 23:09:33 | benjamin.peterson | set | messageid: <1313536173.74.0.884942372339.issue12766@psf.upfronthosting.co.za> |
2011-08-16 23:09:33 | benjamin.peterson | link | issue12766 messages |
2011-08-16 23:09:33 | benjamin.peterson | create | |
|