Re: Stack Overflow moderator “animuson”

Joshua Landau joshua at landau.ws
Wed Jul 10 17:54:02 CEST 2013


On 10 July 2013 10:00, Steven D'Aprano <steve at pearwood.info> wrote:
> On Wed, 10 Jul 2013 07:55:05 +0000, Mats Peterson wrote:
>
>> A moderator who calls himself “animuson” on Stack Overflow doesn’t want
>> to face the truth. He has deleted all my postings regarding Python
>> regular expression matching being extremely slow compared to Perl.
>
> That's by design. We don't want to make the same mistake as Perl, where
> every problem is solved by a regular expression:
>
> http://neilk.net/blog/2000/06/01/abigails-regex-to-test-for-prime-numbers/
>
> so we deliberately make regexes as slow as possible so that programmers
> will look for a better way to solve their problem. If you check the
> source code for the re engine, you'll find that for certain regexes, it
> busy-waits for anything up to 30 seconds at a time, deliberately wasting
> cycles.

I hate to sound like this but do you realise that this is exactly what
you're arguing for when saying that sum() shouldn't use "+="?

(There is no spite in the above sentence, but it sounds like there is.
There is however no way obvious to me to remove it without changing
the sentence's meaning.)

> The same with Unicode. We hate French people,

And for good damn reason too. They're ruining our language, á mon avis.

> you see, and so in an
> effort to drive everyone back to ASCII-only text, Python 3.3 introduces
> some memory optimizations that ensures that Unicode strings work
> correctly and are up to four times smaller than they used to be. You
> should get together with jmfauth, who has discovered our dastardly plot
> and keeps posting benchmarks showing how on carefully contrived micro-
> benchmarks using a beta version of Python 3.3, non-ASCII string
> operations can be marginally slower than in 3.2.



More information about the Python-list mailing list