Re: [Python-Dev] IDLE colorizer

2018-04-02 Thread Guido van Rossum
Heh. The good old manual approach. :-) How bad indeed? >>> from idlelib import colorizer; colorizer.make_pat() from idlelib import colorizer; colorizer.make_pat()

Re: [Python-Dev] IDLE colorizer

2018-04-02 Thread MRAB
On 2018-04-02 05:43, Guido van Rossum wrote: 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

Re: [Python-Dev] IDLE colorizer

2018-04-01 Thread Guido van Rossum
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

Re: [Python-Dev] IDLE colorizer

2018-04-01 Thread Terry Reedy
On 4/1/2018 10:20 PM, Tim Peters wrote: [MRAB [ 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

Re: [Python-Dev] IDLE colorizer

2018-04-01 Thread Tim Peters
[MRAB [ > 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

[Python-Dev] IDLE colorizer

2018-04-01 Thread MRAB
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