Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.06; 'string': 0.09; 'formatting': 0.09; 'pep': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subset': 0.09; 'python': 0.11; 'ascii,': 0.16; 'corrupt': 0.16; 'encoding.': 0.16; 'entirely.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'then?': 0.16; 'unchanged,': 0.16; 'worst': 0.16; 'wrote:': 0.18; 'dependent': 0.19; 'example': 0.22; 'header:User-Agent:1': 0.23; 'least': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply- To:1': 0.27; 'correct': 0.29; 'rest': 0.29; 'leave': 0.29; 'on,': 0.29; 'assumes': 0.31; 'dropped': 0.31; 'subject:some': 0.31; 'worked': 0.33; 'entirely': 0.33; 'implemented': 0.33; 'could': 0.34; 'but': 0.35; 'there': 0.35; 'impression': 0.36; 'done': 0.36; 'should': 0.36; 'wrong': 0.37; 'being': 0.38; 'e.g.': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'continued': 0.60; 'ian': 0.60; 'received:109': 0.72; 'behavior': 0.77; '..........': 0.84 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: Fri, 06 Jun 2014 12:56:32 +0100 References: <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> <53909801.5080008@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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1402055808 news.xs4all.nl 2843 [2001:888:2000:d::a6]:51227 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:72838 On 05/06/2014 18:16, Ian Kelly wrote: ......... > > How should e.g. bytes.upper() be implemented then? The correct > behavior is entirely dependent on the encoding. Python 2 just assumes > ASCII, which at best will correctly upper-case some subset of the > string and leave the rest unchanged, and at worst could corrupt the > string entirely. There are some things that were dropped that should > not have been, but my impression is that those are being worked on, > for example % formatting in PEP 461. > bytes.upper should have done exactly what str.upper in python 2 did; that way we could have at least continued to do the wrong thing :) -- Robin Becker