Ned Batchelder <n...@nedbatchelder.com> added the comment:

This seems like a confusion of two things: identifiers are lexical elements of 
the language.  Attributes are not limited to identifiers.

We could add to the docs for setattr: "The attribute name does not have to be a 
valid identifier."   I don't know what the language guarantees about what 
strings are valid as attribute names.

----------
nosy: +nedbat

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

Reply via email to