[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-10-08 Thread Sanyam Khurana
Sanyam Khurana added the comment: Marking this fixed via https://github.com/python/cpython/commit/ffc5a14d00db984c8e72c7b67da8a493e17e2c14 and https://github.com/python/cpython/commit/fc8205cb4b87edd1c19e1bcc26deaa1570f87988 Thanks, everyone! -- resolution: -> fixed stage: patch

[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-10-08 Thread Lele Gaifax
Change by Lele Gaifax : -- keywords: +patch pull_requests: +9141 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-10-08 Thread Carol Willing
Carol Willing added the comment: New changeset ffc5a14d00db984c8e72c7b67da8a493e17e2c14 by Carol Willing (Sanyam Khurana) in branch 'master': bpo-33014: Clarify str.isidentifier docstring (GH-6088) https://github.com/python/cpython/commit/ffc5a14d00db984c8e72c7b67da8a493e17e2c14 --

[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-03-27 Thread R. David Murray
R. David Murray added the comment: I think my wording would be an improvement to the docs as well. You could link just the keyword function if you are worried about too many links, since that would keep the link count the same. --

[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-03-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with David about the docstring. But I think that no changes are needed in the module documentation. David's wording would contain two links (for iskeyword() and for keyword), and many links distract the attention. We

[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-03-17 Thread R. David Murray
R. David Murray added the comment: For the original report that this issue was opened for: Use keyword.iskeyword() to test for reserved identifiers such as "def" and "class". The obvious replacement is: Use the iskeyword() function from the keyword module to

[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-03-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: Separate PRs for doc and code changes will be needed anyway if the code change is restricted to 3.8. To me, changing keyword.iskeyword.__doc__ from the irrelevant Python tautology 'x.__contains__(y) <==> y in x.' to something that says what

[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-03-12 Thread Cheryl Sabella
Cheryl Sabella added the comment: Too bad we couldn't do: iskeyword = frozenset(kwlist).__contains__ iskeyword.__doc__ = 'Test whether a string is a reserved identifier.' But I'm sure there are reasons for this: AttributeError: attribute '__doc__' of

[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-03-12 Thread Carol Willing
Carol Willing added the comment: I've made an additional suggestion on the open PR to add an example to the `.rst` doc that better clarifies the differences and usage of `iskeyword` and `isidentifier`. Perhaps making that addition and skipping the updates to the C source

[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-03-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For changing a docstring we have to change the implementation of iskeyword(). It seems to me that the current implementation is the fastest, and any other implementation will be a tiny bit slower. I just wanted to say that this

[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-03-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: As I posted above, keywork.iskeyword already has a bizarrely incorrect docstring, so how can there be a performance impact? And why single out such a rarely used function? -- ___ Python tracker

[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-03-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The change that will add a docstring to keyword.iskeyword() inevitable will have a negative performance effect. Is it worth it? -- nosy: +rhettinger, serhiy.storchaka ___ Python

[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-03-12 Thread Sanyam Khurana
Sanyam Khurana added the comment: Carol, Yes, I've raised a PR. Currently, I've updated the docs for `str.isidentifier` clarifying the usage of `keyword.iskeyword` For updating the docstring of `keyword.iskeyword`, I saw that `Lib/Keyword.py` defines this on line

[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-03-12 Thread Sanyam Khurana
Change by Sanyam Khurana : -- keywords: +patch pull_requests: +5850 stage: needs patch -> patch review ___ Python tracker

[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-03-10 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 2.7, Python 3.6, Python 3.8 ___ Python tracker ___

[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-03-10 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +willingc -serhiy.storchaka title: Clarify str.isidentifier docstring, fix keyword.iskeyword docstring -> Clarify str.isidentifier docstring; fix keyword.iskeyword docstring versions: -Python 2.7, Python 3.6, Python 3.8

[issue33014] Clarify str.isidentifier docstring, fix keyword.iskeyword docstring

2018-03-10 Thread Terry J. Reedy
Terry J. Reedy 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

[issue33014] Clarify str.isidentifier docstring, fix keyword.iskeyword docstring

2018-03-10 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: Clarify doc string for str.isidentifier() -> Clarify str.isidentifier docstring, fix keyword.iskeyword docstring ___ Python tracker