bpo-33014: Clarify str.isidentifier docstring by CuriousLearner · Pull Request #6088 · python/cpython (original) (raw)

CuriousLearner: I presume, but don't know for sure, that you can pur '(x)' outside the backticks and get the hyperlink.

Serhiy: Either proposed change, the second of which is based on your statement, is more informative, not less, and more technically correct, not less. Your said it yourself. iskeyword "test[s] whether string s is a reserved identifier [singular]", whereas the somewhat cryptic 'test for reserved identifiers [plural]' can easily be expanded to and construed as meaning 'test whether string s contains reserved identifiers [plural]". The IDLE colorizer does just that. It 'tests for reserved keywords', in this sense, and when it finds them, tags them.