Path: csiph.com!eternal-september.org!feeder.eternal-september.org!feeds.phibee-telecom.net!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'received:134': 0.05; 'that?': 0.05; 'indexes': 0.09; 'indicates': 0.09; 'marking': 0.09; 'explicitly': 0.15; 'globals.': 0.16; 'local.': 0.16; 'opposite': 0.16; 'received:ac.be': 0.16; 'variable': 0.18; 'language': 0.19; 'programming': 0.22; 'header :In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'example': 0.26; 'fine': 0.28; 'code': 0.30; 'received:be': 0.30; "i'd": 0.31; 'probably': 0.31; 'but': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'say': 0.37; 'takes': 0.39; 'to:addr:python.org': 0.40; 'mark': 0.40; 'some': 0.40; 'schreef': 0.84; 'overall,': 0.93 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlkFACie7lWGuA9G/2dsb2JhbABdhDsBg0jBcwoCggMBAQEBAQGFLwEBBCNVEQsaAgUWCwICCQMCAQIBRRMIAogqtR+PYIRBAQEIAiCBIoVRhHuFExeCUoFDAQSVVYx6iGySCyaEAok4AQEB Date: Tue, 08 Sep 2015 10:40:12 +0200 From: Antoon Pardon User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.8.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Python handles globals badly. References: <86fa425b-d660-45ba-b0f7-3beebdec8e14@googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1441701619 news.xs4all.nl 23732 [2001:888:2000:d::a6]:41038 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96105 Op 05-09-15 om 02:05 schreef Vladimir Ignatov: >> To me, marking a variable as global in a large number of functions is >> a code smell that indicates that you're probably overusing globals. >> Lua is an example of a language that takes the opposite approach: in >> Lua, every variable is global unless you explicitly mark it as local. >> Lua is a fine language overall, but that is one of my pet peeves with > I had some experience programming in Lua and I'd say - that language > is bad example to follow. > Indexes start with 1 (I am not kidding) What is so bad about that?