[docs] [issue35105] Document that CPython accepts "invalid" identifiers
Ned Batchelder
report at bugs.python.org
Sat Nov 3 17:31:25 EDT 2018
Ned Batchelder <ned at 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 <report at bugs.python.org>
<https://bugs.python.org/issue35105>
_______________________________________
More information about the docs
mailing list