Message142235
> 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__). |
|
Date |
User |
Action |
Args |
2011-08-16 23:13:14 | pitrou | set | recipients:
+ pitrou, benjamin.peterson |
2011-08-16 23:13:13 | pitrou | link | issue12766 messages |
2011-08-16 23:13:13 | pitrou | create | |
|