Terry J. Reedy <tjre...@udel.edu> added the comment:

Debating historical design decisions that effectively cannot be changed is off 
topic for the tracker (but fair game on python-list).  However, I will explain 
this much.  The s.isxyz questions are answered by examining the characters and 
codepoints in s.  Answering iskeyword(s) requires reference to the collection 
of keywords, kwlist, which must be exposed to users, and which may change in 
any new version.  We usually attach constant data attributes to modules (other 
than builtins), and never (that I can think of) to built-in classes.  "def 
iskeyword(s): return s in kwlist:" belongs in the module with kwlist.

----------
nosy:  -willingc
title: Clarify doc string for str.isidentifier() -> Clarify str.isidentifier 
docstring, fix keyword.iskeyword docstring

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

Reply via email to