Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!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; 'broken': 0.04; 'subject:Python': 0.06; 'explicit': 0.07; 'broke': 0.09; 'clean.': 0.09; 'deemed': 0.09; 'literal': 0.09; 'subject:language': 0.09; 'things,': 0.09; 'try:': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '"to': 0.16; 'argument.': 0.16; 'backward': 0.16; 'braces': 0.16; 'devs': 0.16; 'dictionary,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'function?': 0.16; 'nameerror:': 0.16; 'notation': 0.16; 'notations': 0.16; 'subject: \n ': 0.16; 'subject:?)': 0.16; 'subject:unicode': 0.16; 'xrange': 0.16; 'wrote:': 0.18; '3.0': 0.19; '>>>': 0.22; 'input': 0.22; 'cc:addr:python.org': 0.22; 'print': 0.22; 'cc:2**0': 0.24; 'developers': 0.25; 'pass': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'message- id:@mail.gmail.com': 0.30; '25,': 0.31; 'handled': 0.32; "we're": 0.32; 'running': 0.33; 'could': 0.34; "can't": 0.35; 'except': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'set.': 0.36; 'transition': 0.36; "didn't": 0.36; 'changing': 0.37; 'pm,': 0.38; "couldn't": 0.39; 'break': 0.61; 'range': 0.61; 'places': 0.64; 'more': 0.64; 'different': 0.65; 'benefit': 0.68; 'mar': 0.68; 'programs,': 0.74; 'potentially': 0.81; 'subject:this': 0.83; 'clearly.': 0.84; 'everywhere.': 0.84; 'pardon': 0.84; 'worthwhile.': 0.84; 'to:none': 0.92 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:cc :content-type; bh=CYbzQtWzaUxDchGanDNpqn3vR4T2tXpfjl+cWNCbWDo=; b=z4dCnJFR5OKpx4ECuRor8KyoWhNhvy+cPn8UCZB2yIPyHiGCT+yGOpCKUwDTnvYcYe ISrV13nldi4svN8ix4D3PhTabLZcIqqcFrzjhkRj5iT5sZ/102ZUOVbGWmoGQYIM4RcM +jG7/5xMsLO3u5kfJP/5PEs4iWsxkjo8NkukWI3jI4XWyaqinUFtIsb/BIgnDD/CA3d4 vM8i8DcuxBV+0Ad14+dtidJbN2zK57J2vFBwKHrQ0baW/M6rvv5aJ/5xXO5Xgqji0db0 o4lPiIWCz5xg6Ye29AkF5p/Cgw2swap67XDptQhrZIP56cxt2Tkc7tF9KArA3flv6gYS CDuQ== MIME-Version: 1.0 X-Received: by 10.66.27.202 with SMTP id v10mr15810847pag.127.1395751516647; Tue, 25 Mar 2014 05:45:16 -0700 (PDT) In-Reply-To: <53317191.7050701@rece.vub.ac.be> References: <9daf0806-02de-4447-964c-c8f8953c23e5@googlegroups.com> <532d5bd9$0$29994$c3e8da3$5496439d@news.astraweb.com> <0b78649a-16b3-4410-8258-e859578d62be@googlegroups.com> <53060a97-44fb-4e53-a7a7-d5eeed416f62@googlegroups.com> <5331595D.5020008@rece.vub.ac.be> <53317191.7050701@rece.vub.ac.be> Date: Tue, 25 Mar 2014 23:45:16 +1100 Subject: Re: Time we switched to unicode? (was Explanation of this Python language feature?) From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 35 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1395751525 news.xs4all.nl 2949 [2001:888:2000:d::a6]:33287 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:69018 On Tue, Mar 25, 2014 at 11:07 PM, Antoon Pardon wrote: > On 25-03-14 12:12, Chris Angelico wrote: > >> On Tue, Mar 25, 2014 at 9:24 PM, Antoon Pardon >> wrote: >>> No they didn't have to. With the transition to python3, the developers >>> could have opted for empty braces to mean an empty set. And if they >>> wanted a literal for an empty dictionary, they might have chosen {:}. >>> Backward-compatibility was already broken so that wasn't an argument. >> Python 3.0 didn't just say "to Hades with backward compatibility". The >> breakage was only in places where it was deemed worthwhile. Changing >> the meaning of {} would have only small benefit and would potentially >> break a LOT of programs, so the devs were right to not do it. > > More programs than those who broke because print was now a function? > Do you think it would have been so problamatic that it couldn't have > been handled by '2to3'? It makes the same notation mean different things, in ways that are hard to render clearly. You can write a Py3 program and put this at the top for Py2: try: input = raw_input range = xrange except NameError: # We're running on Python 3 pass But you can't do the same for braces. You'd have to eschew *both* literal-ish notations and use explicit constructors everywhere. Not clean. ChrisA