Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!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.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'string.': 0.05; 'that?': 0.05; 'subject:Python': 0.06; 'subject: [': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'iterating': 0.16; 'iterator': 0.16; 'iterators': 0.16; 'offsets': 0.16; 'process?': 0.16; 'wrote:': 0.18; 'seems': 0.21; 'example': 0.22; "aren't": 0.24; 'byte': 0.24; 'parse': 0.24; "i've": 0.25; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'fri,': 0.33; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'operations': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'are,': 0.36; 'doing': 0.36; 'received:209': 0.37; 'subject:]': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'conversion': 0.61; 'mar': 0.68; 'safe': 0.72; 'subject:long': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=39mxQtRj6Pm+WbUk8pmMO+g/dSzLMt+n9khymho9ba4=; b=rJYt7Idc7ztRIDvheXFJCxz8V4aJv8Vj92NPD7z3V4u4BedkfpSFPs7W52pSJYRj25 ilRUWjUi1h98xnR/4Zi5EPL5MVU/weHOnfqKNzwbQob/pJy3Oo9ts6+5u03HYNgMpCBQ DMz99hbTfFv8ASpdLSGX4oLKpwulctr7MMRv3g6OlU12Aoz4ni/xu/YcYKBjsUu/eFq8 qzl9wCTfpBRzVkKiJVzjEwWRXH8Of2eeKvdIjox2EDv16aILA6Thmy2qSWjLTVeVECvM iq6b1yGk8qkOH2rGZM/I6lGl4N3l7XX4N7j2OjR7lKNxFi61wrIvFETahpo82JBXZqoY k+fA== MIME-Version: 1.0 X-Received: by 10.220.88.145 with SMTP id a17mr885592vcm.66.1364535232938; Thu, 28 Mar 2013 22:33:52 -0700 (PDT) In-Reply-To: <-LGdnWTpyKcdkcjMnZ2dnUVZ_jCdnZ2d@westnet.com.au> References: <0b779c80-4f50-4716-8c30-47755c15f304@m12g2000yqp.googlegroups.com> <5153a12d$0$29998$c3e8da3$5496439d@news.astraweb.com> <987c4bd9-0e5e-4387-9c78-1075a77d3c47@c6g2000yqh.googlegroups.com> <51543f45$0$29998$c3e8da3$5496439d@news.astraweb.com> <-LGdnWTpyKcdkcjMnZ2dnUVZ_jCdnZ2d@westnet.com.au> Date: Fri, 29 Mar 2013 16:33:52 +1100 Subject: Re: flaming vs accuracy [was Re: Performance of int/long in Python 3] 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: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364535241 news.xs4all.nl 6865 [2001:888:2000:d::a6]:53690 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42224 On Fri, Mar 29, 2013 at 2:34 PM, Neil Hodgson wrote: > It doesn't horrify me - I've been working this way for over 10 years and > it seems completely natural. You can wrap access in iterators that hide the > byte offsets if you like. This then ensures that all operations on those > iterators are safe only allowing the iterator to point at the start/end of > valid characters. But both this and your example of case conversion are, fundamentally, iterating over the string. What if you aren't doing that? What if you want to parse and process? ChrisA