On 10 July 2013 18:15, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: > On Wed, 10 Jul 2013 16:54:02 +0100, Joshua Landau wrote: > >> On 10 July 2013 10:00, Steven D'Aprano <st...@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 "+="? > > You're referencing an off-list conversation, which will probably confuse > most others reading this. > > I don't agree with that. Apart from one throw-away comment where I said > that sometimes it is handy to have a trivial example of an O(N**2) > algorithm for teaching purposes, I have never made any suggestion that > having sum(lists) be slow was a good thing in and of itself.
I might be misattributing posts then. Or... YOU'RE IN DENIAL! Who wins? You decide! -- http://mail.python.org/mailman/listinfo/python-list