Terry J. Reedy <tjre...@udel.edu> added the comment: Part of my reason for closing is that we have an index entry "iskeyword() (in module keyword)" to help anyone who tries the function as a method. But I am reopening for 2 reasons:
1. I think the following is a better improvement that reads better as well as being more informative. I would be willing to merge it. "Call keyword.iskeyword(s) to test whether string s is a reserved identifier, such as "def" or "class". 2. We should fix the buggy iskeyword docstring in 2.7 and 3.x. >>> keyword.iskeyword.__doc__ 'x.__contains__(y) <==> y in x.' Replace with the doc entry: "Return true if s is a Python keyword." ---------- resolution: rejected -> stage: resolved -> needs patch status: closed -> open type: -> behavior versions: +Python 2.7, Python 3.6, Python 3.8 _______________________________________ 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