Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:module': 0.04; '*not*': 0.05; 'correct.': 0.09; 'received:64.4': 0.09; 'defined': 0.14; 'mistaken.': 0.16; 'subject:global': 0.16; 'seems': 0.20; 'variable': 0.21; "aren't": 0.22; 'header:In-Reply-To:1': 0.22; 'trying': 0.23; 'module,': 0.23; 'problem': 0.29; 'object': 0.30; 'module': 0.30; 'differences': 0.30; 'imported': 0.30; 'it.': 0.33; 'to:addr:python-list': 0.34; 'header:User-Agent:1': 0.34; 'module.': 0.35; 'charset:us-ascii': 0.36; 'but': 0.37; 'subject:: ': 0.38; 'steven': 0.38; 'data': 0.39; 'to:addr:python.org': 0.39; 'your': 0.60; 'happen': 0.62; 'here': 0.66 Date: Mon, 4 Jul 2011 15:26:47 -0800 From: Tim Johnson To: python-list@python.org Subject: Re: Testing if a global is defined in a module References: <3dc7e7a8-9a90-499a-b544-bb9969d9ab55@t5g2000yqj.googlegroups.com> <4e124916$0$29970$c3e8da3$5496439d@news.astraweb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4e124916$0$29970$c3e8da3$5496439d@news.astraweb.com> Organization: AkWebsoft User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 1309821881 news.xs4all.nl 21796 [2001:888:2000:d::a6]:58468 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:8800 * Steven D'Aprano [110704 15:18]: > > You are mistaken. TestAddresses is *not* a member of an imported module. It > is a member of the current module, which may or may not happen to point to > the same object as the other module as well. You are correct. I mispoke or misapplied. See my last post. > > > 'usingCgi' is the only data variable defined in > > It seems to me that your approach here is unnecessarily complex and fragile. > I don't know what problem you are trying to solve, but trying to solve it > by intraspecting differences that aren't differences is surely the wrong > way to do it. See my last post... -- Tim tim at johnsons-web dot com or akwebsoft dot com http://www.akwebsoft.com