Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'model,': 0.05; 'subject:Python': 0.06; 'conversions': 0.09; 'mess': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'second.': 0.09; 'python': 0.11; '2.7': 0.14; "wouldn't": 0.14; 'barrier': 0.16; 'comparable.': 0.16; 'dislike': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reversing': 0.16; 'underlying': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'obviously': 0.18; 'bit': 0.19; 'header:User-Agent:1': 0.23; 'bytes': 0.24; 'string,': 0.24; 'unicode': 0.24; 'first,': 0.26; 'second': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'chris': 0.29; 'change,': 0.30; "i'm": 0.30; 'code': 0.31; 'bunch': 0.31; 'helpful.': 0.31; 'subject:some': 0.31; 'probably': 0.32; 'stuff': 0.32; 'another': 0.32; 'agree': 0.35; 'convert': 0.35; 'good.': 0.35; 'operations': 0.35; 'point.': 0.35; 'but': 0.35; 'there': 0.35; 'really': 0.36; 'should': 0.36; 'list': 0.37; 'being': 0.38; 'to:addr:python- list': 0.38; 'does': 0.39; 'extremely': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'balance': 0.61; 'making': 0.63; 'information': 0.63; 'more': 0.64; 'worth': 0.66; 'real-world': 0.68; 'default': 0.69; 'received:109': 0.72; 'remained': 0.84; 'sake.': 0.84; 'convinced': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Robin Becker Subject: Re: Python 3.2 has some deadly infection Date: Thu, 05 Jun 2014 17:17:05 +0100 References: <538bcfff$0$29978$c3e8da3$5496439d@news.astraweb.com> <538C5BB8.1020702@chamonix.reportlab.co.uk> <538f1a61$0$29978$c3e8da3$5496439d@news.astraweb.com> <53902bb1$0$11109$c3e8da3@news.astraweb.com> <87wqcvu20h.fsf@elektro.pacujo.net> <7b3543f6-6f62-49c5-abdc-e2783fd6d629@googlegroups.com> <87oay7tnxt.fsf@elektro.pacujo.net> <53908EB3.70202@chamonix.reportlab.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 109.174.168.73 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: 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: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1401985039 news.xs4all.nl 2932 [2001:888:2000:d::a6]:58792 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:72725 On 05/06/2014 16:50, Chris Angelico wrote: .......... > > I wouldn't say they're second-class; it's more that the bytes type was > considered to be more like a list of ints than like a Unicode string, > and now that there are a few years' worth of real-world usage > information to learn from, it's known that some more string-like > operations will be extremely helpful. So now they're being added, > which I agree is a good thing. in python 2 str and unicode were much more comparable. On balance I think just reversing them ie str --> bytes and unicode --> str was probably the right thing to do if the default conversions had been turned off. However making bytes a crippled thing was wrong. > > Whether b"a"[0] should be b'a' or ord(b'a') is another sticking point. > The Py2 str does the first, the Py3 bytes does the second. That one's > a bit hard to change, but what I'm not sure of is how significant this > is to new-build Py3 code. Obviously it's a barrier to porting, but is > it important on its own? However, that's still not really "byte > strings are second class". ...... I dislike the current model, but that's because I had a lot of stuff to convert and probably made a bunch of blunders. The reportlab code is now a mess of hacks to keep it alive for 2.7 & >=3.3; I'm probably never going to be convinced that uncode types are good. Bytes are the underlying concept and should have remained so for simplicity's sake. -- Robin Becker