New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interning string constants with null character #72536
Comments
Currently string constants are interned if they consist of ASCII word characters ([0-9A-Za-z_]). But strings are tested only to the first null character. This is not problem for names, since they can't include null characters, but string constants that contains ASCII non-word characters after the null character passes this test. Proposed simple patch fixes the testing function all_name_chars(). Other question: shouldn't PyUnicode_IsIdentifier() be used in 3.x? |
all_name_chars.patch LGTM. |
Thanks Victor. |
I have no opinion on interning non-ASCII strings. |
New changeset 522adc2e082a by Serhiy Storchaka in branch '2.7': New changeset d7ab3241aef2 by Serhiy Storchaka in branch '3.5': New changeset 8585b4de4fc0 by Serhiy Storchaka in branch '3.6': New changeset 563d523036c6 by Serhiy Storchaka in branch 'default': |
Added tests and refactored all_name_chars(). |
Misc/NEWS
so that it is managed by towncrier #552Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: