Path: csiph.com!au2pb.net!1.us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!ecngs!testfeeder.ecngs.de!81.171.118.63.MISMATCH!peer03.fr7!news.highwinds-media.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Peter Otten <__peter__@web.de> Newsgroups: comp.lang.python Subject: Re: a clarification on the "global" statement sought Date: Fri, 11 Mar 2016 10:23:25 +0100 Organization: None Lines: 25 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: news.uni-berlin.de 1ok3JCdQUBXnEImx31sEBwSJPNAsZf4avDJjxvTluCGQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:skip:c 10': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; '2016': 0.16; 'detects': 0.16; 'egg': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'received:t-ipconnect.de': 0.16; 'superfluous': 0.16; 'wrote:': 0.16; 'code,': 0.23; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; 'chris': 0.26; 'external': 0.27; 'fri,': 0.27; 'question': 0.27; 'figured': 0.29; 'perl': 0.29; 'checked': 0.31; 'legacy': 0.33; 'expected': 0.35; 'there': 0.36; 'tool': 0.36; 'subject:" ': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'thanks': 0.37; 'received:org': 0.37; 'things': 0.38; 'end': 0.39; 'subject:the': 0.39; 'well.': 0.40; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'called': 0.40; 'face': 0.64; 'mar': 0.65; 'here': 0.66; 'smith': 0.76; 'actually,': 0.84; 'chrisa': 0.84 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: p57bd9af8.dip0.t-ipconnect.de User-Agent: KNode/4.13.3 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Received-Bytes: 3269 X-Received-Body-CRC: 2426305577 Xref: csiph.com comp.lang.python:104600 Charles T. Smith wrote: > On Fri, 11 Mar 2016 19:29:20 +1100, Chris Angelico wrote: > >> Usefully? Never. >> >> Simple question - simple answer :) >> >> ChrisA > > > Right, that was the expected answer as well. I just ran into that in > legacy code, checked out the documentation and couldn't really make that > out. So I figured I better ask here before I end up with egg on my face > > :) > > Thanks folks. > > Actually, it would be nice if there were a -lint or -warnings flag > for such cases, a la perl or gcc. There is an external tool called pylint that among other things detects superfluous global statements.