Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Objects in Python

Received: by 10.216.235.217 with SMTP id u67mr597904weq.9.1345991287168;
        Sun, 26 Aug 2012 07:28:07 -0700 (PDT)
Path: e9ni24538428wia.0!nntp.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newspeer1.nac.net!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.snarked.org!newsfeed.news.ucla.edu!ihnp4.UCSD.Edu!nntp.ucr.edu!solaris.cc.vt.edu!news.vt.edu!news.glorb.com!news.astraweb.com!border6.newsrouter.astraweb.com!not-for-mail
From: Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info>
Subject: Re: Objects in Python
Newsgroups: comp.lang.python
References: <18409992-1e28-4721-8e64-60c69668da4e@googlegroups.com>
	<w7adnXiWqoJSbqnNnZ2dnUVZ7o2dnZ2d@bt.com>
	<mailman.3668.1345654939.4697.python-list@python.org>
	<gsSdnaYuqqabhqjNnZ2dnUVZ8jmdnZ2d@bt.com>
	<mailman.3675.1345659675.4697.python-list@python.org>
	<1pidnX71rLNrsajNnZ2dnUVZ8jCdnZ2d@bt.com>
	<mailman.3691.1345687339.4697.python-list@python.org>
User-Agent: Pan/0.133 (House of Butterflies)
MIME-Version: 1.0
Date: 23 Aug 2012 04:11:52 GMT
Lines: 20
Message-ID: <5035ad87$0$1645$c3e8da3$76491128@news.astraweb.com>
Organization: Unlimited download news at news.astraweb.com
NNTP-Posting-Host: e5be0479.news.astraweb.com
X-Trace: DXC=>=T=PmThWg14K?0c7HD\@7L?0kYOcDh@:DS__J8CTVn70WDN7dFMi;8<Ah6b28J?E4[TQcRT34dX1c10_PEjoU9?D9[7PSePJ5;
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

On Thu, 23 Aug 2012 12:02:16 +1000, Chris Angelico wrote:

> 2) Related to the above, you can infinitely nest scopes. There's nothing
> wrong with having six variables called 'q'; you always use the innermost
> one. Yes, this can hurt readability

Well, there you go. There *is* something wrong with having six variables 
called 'q'.

Namespaces and scopes are work-arounds for the fact that, while there are 
an infinite number of possible names, most of the good ones are already 
taken.

Namespaces and scopes mean that I can use a name "q" even though I've 
already used it for something else, but there is still cost to re-using 
names (even if that cost is sometimes trivial).


-- 
Steven