This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dabeaz
Recipients dabeaz, docs@python
Date 2018-03-06.15:50:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1520351440.06.0.467229070634.issue33014@psf.upfronthosting.co.za>
In-reply-to
Content
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 opposed to this:

    import keyword
    keyword.iskeyword('def')

Perhaps a clarification that "keyword" refers to the keyword module could be added.   Or better yet, just make 'iskeyword()` a string method ;-).
History
Date User Action Args
2018-03-06 15:50:40dabeazsetrecipients: + dabeaz, docs@python
2018-03-06 15:50:40dabeazsetmessageid: <1520351440.06.0.467229070634.issue33014@psf.upfronthosting.co.za>
2018-03-06 15:50:40dabeazlinkissue33014 messages
2018-03-06 15:50:40dabeazcreate