Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!1.eu.feeder.erje.net!bcyclone03.am1.xlned.com!bcyclone03.am1.xlned.com!lightspeed.eweka.nl!lightspeed.eweka.nl!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!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.126 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.76; '*S*': 0.01; "didn't,": 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; "module's": 0.16; 'runs.': 0.16; 'wrote:': 0.16; 'module': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'have,': 0.27; '(which': 0.29; 'function': 0.30; 'code': 0.31; 'probably': 0.32; 'subject:?': 0.34; 'message-id:@gmail.com': 0.35; 'to:addr:python-list': 0.35; 'setting': 0.37; 'subject:: ': 0.37; 'received:org': 0.38; 'pm,': 0.39; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'subject:the': 0.40; 'even': 0.61; 'charset:windows-1252': 0.65; 'ethan': 0.91; 'furman': 0.91; 'subject:Set': 0.91 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Tue, 16 Jun 2015 07:56:21 -0600 From: Michael Torrie 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: Set a flag on the function or a global? References: <557f6676$0$21718$c3e8da3@news.astraweb.com> <557F6BAF.3080702@stoneleaf.us> In-Reply-To: <557F6BAF.3080702@stoneleaf.us> Content-Type: text/plain; charset=windows-1252 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: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1434462986 news.xs4all.nl 2865 [2001:888:2000:d::a6]:59962 X-Complaints-To: abuse@xs4all.nl X-Received-Body-CRC: 2060055201 X-Received-Bytes: 2799 Xref: csiph.com comp.lang.python:92678 On 06/15/2015 06:19 PM, Ethan Furman wrote: > Setting a global on the module (which I may not have, and probably > didn't, import) for only one function is overkill. What do you mean? Even if you pull in just one function from the module on an import, the module's initialization code still runs.