Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Feb 7, 2020

PyUnicode_IsIdentifier() does not call Py_FatalError() anymore if the
string is not ready.

https://bugs.python.org/issue39500

@vstinner
Copy link
Member Author

vstinner commented Feb 7, 2020

@serhiy-storchaka: here is a different approach. Instead of returning -1 on error and require all callers to be modified to start checking for error, I modified the function to never fail. If the string is not ready, I use the legacy API to access it (Py_UNICODE*).

Previous attempt: PR #18280.

PyUnicode_IsIdentifier() does not call Py_FatalError() anymore if the
string is not ready.
@vstinner
Copy link
Member Author

I modified my PR to use _PyUnicode_WSTR() and wchar_t* rather than Py_UNICODE* type.

@vstinner vstinner merged commit f3e7ea5 into python:master Feb 11, 2020
@vstinner vstinner deleted the unicode_isidentifier2 branch February 11, 2020 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants