Antoine Pitrou <pit...@free.fr> added the comment:

> 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)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12766>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to