Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!news-transit.tcx.org.uk!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed6.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.025 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'namespace': 0.09; 'def.': 0.16; 'definition.': 0.16; 'general.': 0.16; 'subject:Overriding': 0.16; 'subject:global': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; "to:name:steven d'aprano": 0.16; 'cc:addr:python-list': 0.16; 'mon,': 0.16; 'wrote:': 0.18; 'cc:no real name:2**0': 0.20; 'dec': 0.22; 'header:In-Reply-To:1': 0.22; '+0100,': 0.23; 'globally': 0.23; 'cc:2**0': 0.24; 'code': 0.25; 'cc:addr:python.org': 0.29; 'confusion': 0.30; 'point,': 0.32; 'objects': 0.32; 'idea': 0.32; 'header:User-Agent:1': 0.33; 'there': 0.33; 'identical': 0.34; "there's": 0.37; 'using': 0.38; 'steven': 0.38; '2011': 0.61; 'your': 0.61; 'making': 0.67; 'received:62': 0.70; 'care': 0.71; 'unique.': 0.84; 'involved.': 0.91 X-IronPort-AV: E=Sophos;i="4.71,344,1320620400"; d="scan'208";a="40058" X-Virus-Scanned: amavisd-new at zimbra.sequans.com Date: Tue, 13 Dec 2011 10:54:51 +0100 From: Jean-Michel Pichavant User-Agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100328) MIME-Version: 1.0 To: Steven D'Aprano Subject: Re: Overriding a global References: <4ee671f6$0$29979$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: <4ee671f6$0$29979$c3e8da3$5496439d@news.astraweb.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: python-list@python.org 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1323770094 news.xs4all.nl 6983 [2001:888:2000:d::a6]:35209 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:17116 Steven D'Aprano wrote: > On Mon, 12 Dec 2011 12:13:33 +0100, Jean-Michel Pichavant wrote: > > >> Using the same name for 2 different objects is a bad idea in general. >> > > We have namespaces precisely so you don't need to care about making names > globally unique. > > > I don't get your point, namespaced names are unique, by definition. foo.aname <> bar.aname The OP showed a code where there was a confusion between a global name and a local one. There's no namespace involved. Having a local name identical to a global one is a bad idea, def. JM