[Python-Dev] IDLE colorizer
Guido van Rossum
guido at python.org
Mon Apr 2 00:43:23 EDT 2018
My question for you: how on earth did you find this?! Speaking of a needle
in a haystack. Did you run some kind of analysis program that looks for
regexprs? (We've received some good reports from someone who did that
looking for possible DoS attacks.)
On Sun, Apr 1, 2018 at 6:49 PM, MRAB <python at mrabarnett.plus.com> wrote:
> 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
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/guido%
> 40python.org
>
--
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20180401/94b1db28/attachment.html>
More information about the Python-Dev
mailing list