[issue33014] Clarify doc string for str.isidentifier()

2018-03-10 Thread Carol Willing
Carol Willing added the comment: Terry's latest documentation suggestion sounds good and "explicit" by including an example. David, I appreciate your doc suggestions. If it's befuddling you, it's likely doing the same for others. CuriousLearner, do you wish to try to incorporate Terry's late

[issue33014] Clarify doc string for str.isidentifier()

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

[issue33014] Clarify doc string for str.isidentifier()

2018-03-10 Thread David Beazley
David Beazley added the comment: s = 'Some String' s.isalnum() s.isalpha() s.isdecimal() s.isdigit() s.isidentifier() s.islower() s.isnumeric() s.isprintable() s.isspace() s.istitle() s.isupper() Not really sure where I would have gotten the idea that it might be referring to s.iskeyword(). B

[issue33014] Clarify doc string for str.isidentifier()

2018-03-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: I don't think my suggestion is much better either, and I otherwise agree with Serhiy. There are a thousand+ more important doc issues. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Pyth

[issue33014] Clarify doc string for str.isidentifier()

2018-03-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If this docstring needs an improvement Terry's wording LGTM. I'm -1 for further complicating it. Where did you get the idea that iskeyword() is a string method? Nothing in the docstring points to this. "keyword" is not used as an alias of "str". It is not

[issue33014] Clarify doc string for str.isidentifier()

2018-03-09 Thread David Beazley
David Beazley added the comment: That wording isn't much better in my opinion. If I'm sitting there looking at methods like str.isdigit(), str.isnumeric(), str.isascii(), and str.isidentifier(), seeing keyword.iskeyword() makes me think it's a method regardless of whether you label it a func

[issue33014] Clarify doc string for str.isidentifier()

2018-03-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: No new string method ;-). "Call function keyword.iskeyword() ..." should make it clear that iskeyword is not a string method. Samyam, I suggest getting agreement on new wording first. Then do PR that is more or less 'pre-approved'. -- nosy: +terry.

[issue33014] Clarify doc string for str.isidentifier()

2018-03-07 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue33014] Clarify doc string for str.isidentifier()

2018-03-06 Thread Sanyam Khurana
Sanyam Khurana added the comment: Hey David, I'm working on this issue. Will submit a PR in a while :) -- nosy: +CuriousLearner ___ Python tracker ___

[issue33014] Clarify doc string for str.isidentifier()

2018-03-06 Thread David Beazley
New submission from David Beazley : This is a minor nit, but the doc string for str.isidentifier() states: Use keyword.iskeyword() to test for reserved identifiers such as "def" and "class". At first glance, I thought that it meant you'd do this (doesn't work): 'def'.iskeyword() As o