<div dir="ltr">call your mom<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 10, 2013 at 12:18 PM, Ethan Furman <span dir="ltr"><<a href="mailto:ethan@stoneleaf.us" target="_blank">ethan@stoneleaf.us</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 07/10/2013 08:54 AM, Joshua Landau wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 10 July 2013 10:00, Steven D'Aprano <<a href="mailto:steve@pearwood.info" target="_blank">steve@pearwood.info</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, 10 Jul 2013 07:55:05 +0000, Mats Peterson wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A moderator who calls himself “animuson” on Stack Overflow doesn’t want<br>
to face the truth. He has deleted all my postings regarding Python<br>
regular expression matching being extremely slow compared to Perl.<br>
</blockquote>
<br>
That's by design. We don't want to make the same mistake as Perl, where<br>
every problem is solved by a regular expression:<br>
<br>
<a href="http://neilk.net/blog/2000/06/01/abigails-regex-to-test-for-prime-numbers/" target="_blank">http://neilk.net/blog/2000/06/<u></u>01/abigails-regex-to-test-for-<u></u>prime-numbers/</a><br>
<br>
so we deliberately make regexes as slow as possible so that programmers<br>
will look for a better way to solve their problem. If you check the<br>
source code for the re engine, you'll find that for certain regexes, it<br>
busy-waits for anything up to 30 seconds at a time, deliberately wasting<br>
cycles.<br>
</blockquote>
<br>
I hate to sound like this but do you realise that this is exactly what<br>
you're arguing for when saying that sum() shouldn't use "+="?<br>
</blockquote>
<br></div>
my_obj = SomeKoolClass()<br>
my_obj.modify_in_some_kool_<u></u>way()<br>
new_result = sum([SKC1, SKC2, SKC3], my_obj)<br>
<br>
Guess what?  You've just changed my_obj.<br>
<br>
--<br>
~Ethan~<span class="HOEnZb"><font color="#888888"><br>
-- <br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/<u></u>mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><div>Joel Goldstick<br></div><a href="http://joelgoldstick.com" target="_blank">http://joelgoldstick.com</a><br></div>
</div>