Path: csiph.com!news.swapon.de!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!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.068 X-Spam-Evidence: '*H*': 0.87; '*S*': 0.00; 'subject:Python': 0.05; 'globals': 0.09; 'programmers,': 0.16; 'reflects': 0.16; 'var.': 0.16; 'wrote:': 0.16; 'header:In-Reply-To:1': 0.24; 'module': 0.25; 'header:User-Agent:1': 0.26; 'var': 0.27; 'function': 0.28; 'point': 0.33; 'received:10.0': 0.34; 'best,': 0.35; 'keyword': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'really': 0.37; 'agree': 0.37; 'to:addr:python.org': 0.40; 'mark': 0.40; 'received:de': 0.40; 'charset:windows-1252': 0.62; 'scientists,': 0.72; 'forth': 0.79; 'collective': 0.91 Date: Wed, 02 Sep 2015 22:08:17 +0200 From: "Sven R. Kunze" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.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: <86fa425b-d660-45ba-b0f7-3beebdec8e14@googlegroups.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-purgate-size: 559 X-purgate-ID: 154282::1441224499-00000778-2D8884F7/0/0 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1441224500 news.xs4all.nl 23830 [2001:888:2000:d::a6]:38206 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95892 On 02.09.2015 20:47, tdev@freenet.de wrote: > I agree with Skybuck Flying. > I am aware if a var is a module function var or a module global var. > If I want read or write a global var. > > Using the keyword global inside each(!) function only > to mark the global var writeable in each of the functions > is really an over-regulation and very annoying from my point of view. It reflects the collective experience of programmers, computer scientists, and so forth of the last decades. Globals are evil. Stay away from them. Best, Sven