[Python-Dev] IDLE colorizer

2018年4月01日 18:53:56 -0700

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))?"
?
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to