Skip to content

bpo-40596: Fix str.isidentifier() for non-canonicalized strings containing non-BMP characters on Windows. - #20035

Closed
serhiy-storchaka wants to merge 2 commits into
python:masterfrom
serhiy-storchaka:isidentifier-legacy
Closed

bpo-40596: Fix str.isidentifier() for non-canonicalized strings containing non-BMP characters on Windows.#20035
serhiy-storchaka wants to merge 2 commits into
python:masterfrom
serhiy-storchaka:isidentifier-legacy

Conversation

@serhiy-storchaka

@serhiy-storchakaserhiy-storchaka commented May 11, 2020

Copy link
Copy Markdown
Member

Comment threadObjects/unicodeobject.c Outdated
{
/* Since there is no way to return an error from PyUnicode_IsIdentifier()
we have to call PyUnicode_READY() to ensure that the string object is
in the "canonical" representation. */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that this comment is worth it. It's something usual to report an error when a function fails. All functions in this file does that. I suggest to remove the comment.

Comment threadObjects/typeobject.c Outdated
Comment threadObjects/unicodeobject.c Outdated
Co-authored-by: Victor Stinner <vstinner@python.org>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core reviewtype-bugAn unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@serhiy-storchaka@vstinner@the-knights-who-say-ni@bedevere-bot