W deW added the comment:

Thanks for the ref to issue14029. I think I see how it works. As long as the 
object's __dict__ accepts the attributeName as a key, it needs not be a valid 
string nor a string at all. Though the latter *is* checked for, and that in 
turn can be circumvented by adding the attribute to the __dict__ directly. An 
object can be made attribute to itself.

However, the documentation falls short here. So far, I haven't found where it 
defines "attribute". Is there any point in defining an attribute that cannot be 
addressed as an attribute if the parser doesn't allow it?

It seems to me that in order to catch programing errors early, the default 
behaviour should include checking the valid syntax of the attribute's name.

----------
components:  -Documentation
versions: +Python 2.7

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

Reply via email to