[issue45692] IDLE: define word/id chars in one place.

Terry J. Reedy report at bugs.python.org
Tue Nov 2 16:48:04 EDT 2021


Terry J. Reedy <tjreedy at udel.edu> added the comment:

hyperparser.py, line 13, _ASCII_ID_CHARS
line 15, _ASCII_ID_FIRST_CHARS, frozenset(string.ascii_letters + "_")

Only used on line 18 and 21 to create 128 item lookup tables.  The point is to be fast as hyperparser scans multiple chars when invoked.  The expandword fix and c.isidentifier() could replace the lookup.  But would they bog down response time?  We need to look at hyperparser use cases and do some testing.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45692>
_______________________________________


More information about the Python-bugs-list mailing list