Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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.019 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; '(b)': 0.07; 'advance': 0.07; 'string': 0.09; 'immutable': 0.09; 'pep': 0.09; 'worse': 0.09; 'python': 0.11; "wouldn't": 0.14; 'cons': 0.16; 'editor,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'immutability': 0.16; 'widgets.': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'thu,': 0.19; 'saying': 0.22; '(a)': 0.24; 'choices': 0.24; 'regardless': 0.24; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'wondering': 0.29; 'chris': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'that.': 0.31; '25,': 0.31; 'argue': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'text': 0.33; '(i.e.': 0.33; 'implemented': 0.33; 'not.': 0.33; 'maybe': 0.34; 'basic': 0.35; 'editor': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'doubt': 0.36; "he's": 0.36; 'picking': 0.36; 'performance': 0.37; 'implement': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'bad': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'even': 0.60; 'above,': 0.60; 'most': 0.60; "you're": 0.61; 'here:': 0.62; 'decided': 0.64; 'different': 0.65; 'here': 0.66; 'normal.': 0.68; 'stated': 0.69; 'jul': 0.74; 'contents,': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=TqU1JtRGqPg6ZSUM/ruwml7IYVbbmaDZ65IujhxOt7A=; b=Pne7nqgCXfjiLsor3VxoeYQJ6FTxsqh3NP6xrKy9baAe65PSubt2e1DDiyE2wFci5r TKraRYz7KnZpjSaPcVC1fArtazjVfypFlwOibgIIQeTocLqmFj0AhRqsoS1/s2gzMxna iz7vaBgiwGDfjYWXxHHlZXC70HTCYqOD0IbVlOBmDi/xUVPRlAoa0y8SO7XjWOUHaJve pbV9SYzsgVNXTMGKdfC/jGG963/olQE4dJHu5dGacTFPXTgHInhiI1hm5ttc8FRjtrQT a6DNq5LCquKdHFlifuQ+qWm0GnzCp8nP4NtG2j58mfMZRqOTlcBBD3azP8RSB81WuLvA 5DTQ== MIME-Version: 1.0 X-Received: by 10.52.34.40 with SMTP id w8mr14197322vdi.7.1374737984097; Thu, 25 Jul 2013 00:39:44 -0700 (PDT) In-Reply-To: <51f0cd7c$0$29971$c3e8da3$5496439d@news.astraweb.com> References: <571a6dfe-fd66-42cf-92fc-8b97cbe6e9e4@googlegroups.com> <51DFDE65.5040001@Gmail.com> <4f1067f6-bc99-42ad-9166-37fb228b90e8@googlegroups.com> <51f0cd7c$0$29971$c3e8da3$5496439d@news.astraweb.com> Date: Thu, 25 Jul 2013 17:39:43 +1000 Subject: Re: RE Module Performance From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1374737987 news.xs4all.nl 15915 [2001:888:2000:d::a6]:57845 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51202 On Thu, Jul 25, 2013 at 5:02 PM, Steven D'Aprano wrote: > On Thu, 25 Jul 2013 00:34:24 +1000, Chris Angelico wrote: > >> But mainly, I'm just wondering how many people here have any basis from >> which to argue the point he's trying to make. I doubt most of us have >> (a) implemented an editor widget, or (b) tested multiple different >> internal representations to learn the true pros and cons of each. And >> even if any of us had, that still wouldn't have any bearing on PEP 393, >> which is about applications, not editor widgets. As stated above, Python >> strings before AND after PEP 393 are poor choices for an editor, ergo >> arguing from that standpoint is pretty useless. > > That's a misleading way to put it. Using immutable strings as editor > buffers might be a bad way to implement all but the most trivial, low- > performance (i.e. slow) editor, but the basic concept of PEP 393, picking > an internal representation of the text based on its contents, is not. > That's just normal. The only difference with PEP 393 is that the choice > is made on the fly, at runtime, instead of decided in advance by the > programmer. Maybe I worded it poorly, but my point was the same as you're saying here: that a Python string is a poor buffer for editing, regardless of PEP 393. It's not that PEP 393 makes Python strings worse for writing a text editor, it's that immutability does that. ChrisA