Skip to content
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

bpo-45692: Improve support of non-ASCII identifiers in IDLE #29381

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Nov 3, 2021

https://bugs.python.org/issue45692

@serhiy-storchaka
Copy link
Member Author

@serhiy-storchaka serhiy-storchaka commented Nov 3, 2021

It is a draft. Needed tests.

Loading

@@ -14,13 +14,6 @@
# all ASCII chars that may be the first char of an identifier
_ASCII_ID_FIRST_CHARS = frozenset(string.ascii_letters + "_")

# lookup table for whether 7-bit ASCII chars are valid in a Python identifier
Copy link
Member Author

@serhiy-storchaka serhiy-storchaka Nov 3, 2021

Choose a reason for hiding this comment

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

_IS_ASCII_ID_CHAR[ord(c)] is slower than c in _ASCII_ID_CHARS.

Loading

while i > 0 and line[i-1] in self.wordchars:
i = i-1
return line[i:]
m = _LAST_WORD_RE.search(line)
Copy link
Member Author

@serhiy-storchaka serhiy-storchaka Nov 3, 2021

Choose a reason for hiding this comment

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

Need to test with long lines.

Loading

@github-actions
Copy link

@github-actions github-actions bot commented Dec 4, 2021

This PR is stale because it has been open for 30 days with no activity.

Loading

@github-actions github-actions bot added the stale label Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants