[Python-Dev] IDLE colorizer (original) (raw)
MRAB python at mrabarnett.plus.com
Sun Apr 1 21:49:58 EDT 2018
- Next message (by thread): [Python-Dev] IDLE colorizer
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
A thread on python-ideas is talking about the prefixes of string literals, and the regex used in IDLE.
Line 25 of Lib\idlelib\colorizer.py is:
stringprefix = r"(?i:\br|u|f|fr|rf|b|br|rb)?"
which looks slightly wrong to me.
The \b will apply only to the first choice.
Shouldn't it be more like:
stringprefix = r"(?:\b(?i:r|u|f|fr|rf|b|br|rb))?"
?
- Next message (by thread): [Python-Dev] IDLE colorizer
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]