Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news1.tnib.de!feed.news.tnib.de!news.tnib.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.029 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'perl,': 0.07; 'expression:': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'moderator': 0.09; 'overflow': 0.09; 'received:184.172': 0.09; 'received:gator410.hostgator.com': 0.09; '~ethan~': 0.09; 'url:blog': 0.10; 'python': 0.11; 'perl.': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'stack': 0.19; '>>>': 0.22; 'saying': 0.22; 'header:User-Agent:1': 0.23; "shouldn't": 0.24; 'source': 0.25; 'certain': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'compared': 0.30; 'matching': 0.30; 'code': 0.31; "d'aprano": 0.31; 'peterson': 0.31; 'steven': 0.31; 'url:06': 0.31; 'skip:m 30': 0.32; 'regular': 0.32; 'guess': 0.33; 'programmers': 0.33; 'problem': 0.35; 'problem.': 0.35; 'but': 0.35; 'himself': 0.36; 'possible': 0.36; 'seconds': 0.37; 'being': 0.38; 'to:addr:python-list': 0.38; 'anything': 0.39; 'url:01': 0.39; 'extremely': 0.39; 'to:addr:python.org': 0.39; 'changed': 0.39; 'expression': 0.60; 'solve': 0.60; 'received:173': 0.61; "you're": 0.61; "you'll": 0.62; "you've": 0.63; 'july': 0.63; 'face': 0.64; 'skip:\xe2 10': 0.65; 'design.': 0.68; 'sound': 0.68; 'subjectcharset:utf-8': 0.72; '8bit%:43': 0.74; 'jul': 0.74; 'cycles.': 0.84; 'received:gateway15.websitewelcome.com': 0.84; 'hate': 0.91; 'mistake': 0.91; '2013': 0.98 Date: Wed, 10 Jul 2013 09:18:27 -0700 From: Ethan Furman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Stack Overflow moderator =?UTF-8?B?4oCcYW5pbXVzb27igJ0=?= References: <51dd22a6$0$11094$c3e8da3@news.astraweb.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator410.hostgator.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stoneleaf.us X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([173.12.184.233]) [173.12.184.233]:36080 X-Source-Auth: ethan+stoneleaf.us X-Email-Count: 2 X-Source-Cap: dG9idWs7dG9idWs7Z2F0b3I0MTAuaG9zdGdhdG9yLmNvbQ== X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1373473109 news.xs4all.nl 15885 [2001:888:2000:d::a6]:53100 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:50378 On 07/10/2013 08:54 AM, Joshua Landau wrote: > On 10 July 2013 10:00, Steven D'Aprano 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 "+="? my_obj = SomeKoolClass() my_obj.modify_in_some_kool_way() new_result = sum([SKC1, SKC2, SKC3], my_obj) Guess what? You've just changed my_obj. -- ~Ethan~