Message142237
> So would you prefer to see
>
> >>> x.foo
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> AttributeError: foo
> >>> x.foo = 5
> >>> x.foo
> 5
> ?
No, I would prefer to see
True
>>> x.foo = 5
>>> x.foo
5
... exactly as in the same class without a __slots__
(the whole point of class attributes being to set default values without
complicating the constructor) |
|
Date |
User |
Action |
Args |
2011-08-16 23:20:01 | pitrou | set | recipients:
+ pitrou, benjamin.peterson |
2011-08-16 23:20:01 | pitrou | link | issue12766 messages |
2011-08-16 23:20:01 | pitrou | create | |
|