A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2018-April/152570.html below:

[Python-Dev] IDLE colorizer

[Python-Dev] IDLE colorizer [Python-Dev] IDLE colorizerMRAB python at mrabarnett.plus.com
Sun Apr 1 21:49:58 EDT 2018
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))?"

?
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4