[docs] [issue25205] setattr accepts invalid identifiers

Martin Panter report at bugs.python.org
Tue Sep 22 23:32:48 CEST 2015

Martin Panter added the comment:

Eryksun: If you mean tagging the bug report, I think we usually tag all the applicable open branches that are due for another release.

I’m not sure anything needs to be documented regarding setattr(). At best it is an implementation detail that should not be relied on, although making the implementation stricter could be a compatibility problem.

There are other places where troublesome names are allowed. One that caught my eye recently is os.sendfile(in=..., ...) is a syntax error, but you can still pass the “in” keyword via os.sendfile(**{"in": ...}, ...).

versions: +Python 3.4, Python 3.5, Python 3.6

Python tracker <report at bugs.python.org>

More information about the docs mailing list