Path: csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'pycon': 0.03; 'anyway.': 0.04; 'subject:Python': 0.05; 'from:addr:yahoo.co.uk': 0.05; 'guido': 0.05; 'reject': 0.05; 'keynote': 0.07; 'objects,': 0.07; 'essential.': 0.09; 'lemburg,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.10; 'it".': 0.16; 'poll': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.16; 'programmer': 0.18; 'language': 0.19; 'lawrence': 0.22; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'van': 0.26; 'switch': 0.27; 'least': 0.27; 'pep': 0.29; 'url:peps': 0.29; 'there.': 0.30; 'e.g.': 0.30; 'table': 0.32; 'language.': 0.32; 'url:python': 0.33; 'michael': 0.33; 'similar': 0.33; 'add': 0.34; 'url:dev': 0.35; 'but': 0.36; 'there': 0.36; 'url:org': 0.36; 'to:addr :python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'being': 0.37; 'received:org': 0.37; '2007': 0.38; 'several': 0.38; 'enough': 0.39; 'to:addr:python.org': 0.40; 'mark': 0.40; 'chance': 0.60; 'here.': 0.62; 'charset:windows-1252': 0.62; 'our': 0.64; 'here': 0.66; 'therefore': 0.67; 'idiomatic': 0.84; 'pythonistas,': 0.84; 'several)': 0.84; 'thing,': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Python handles globals badly. Date: Fri, 4 Sep 2015 01:47:32 +0100 References: <4602a32c-5109-47dd-95bb-b9723738f07f@googlegroups.com> <55E8E09A.3080309@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: 195.147.66.69 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: <55E8E09A.3080309@gmail.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1441327668 news.xs4all.nl 23796 [2001:888:2000:d::a6]:42195 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95984 On 04/09/2015 01:06, Michael Torrie wrote: > On 09/03/2015 01:05 PM, tdev@freenet.de wrote: > >> [The same e.g. with switch statement: add it] > > Switch is a nice-to-have thing, but definitely not essential. A PEP here > (probably already has been several) would at least be read anyway. > However, there are several idiomatic ways of accomplishing the same > thing that are often good enough and familiar to any Python programmer > out there. Since functions are first-class objects, often a dispatch > table is the best way to go here. > https://www.python.org/dev/peps/pep-3103/ "A Switch/Case Statement" by Guido van Rossum, "Rejection Notice - A quick poll during my keynote presentation at PyCon 2007 shows this proposal has no popular support. I therefore reject it". https://www.python.org/dev/peps/pep-0275/ "Switching on Multiple Values" by Marc-André Lemburg, "Rejection Notice - A similar PEP for Python 3000, PEP 3103 [2], was already rejected, so this proposal has no chance of being accepted either." -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence