Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #17100

Re: Overriding a global

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed10.multikabel.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <d@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.009
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; '"if': 0.04; 'default.': 0.09; 'global,': 0.09; 'programmer': 0.10; 'tries': 0.15; 'cc:addr:benfinney.id.au': 0.16; 'cc:name:ben finney': 0.16; 'presence.': 0.16; 'scope.': 0.16; 'subject:Overriding': 0.16; 'subject:global': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; '>>>': 0.18; 'cc:no real name:2**0': 0.20; 'header:In-Reply- To:1': 0.22; 'function': 0.27; 'asking': 0.28; 'variable': 0.28; 'cc:addr:python.org': 0.29; 'pm,': 0.29; 'environment': 0.30; 'yes.': 0.30; 'wanting': 0.32; 'header:User-Agent:1': 0.33; 'actually': 0.33; 'too': 0.34; 'presence': 0.36; 'cc:2**1': 0.36; 'received:192': 0.37; 'think': 0.37; 'could': 0.37; "it's": 0.40; 'received:192.168': 0.40; 'act': 0.65; 'header:Reply-To:1': 0.71; 'reply-to:no real name:2**0': 0.72; 'different.': 0.84; 'reasoning': 0.84
Date Mon, 12 Dec 2011 20:46:14 -0500
From Dave Angel <d@davea.name>
User-Agent Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15
MIME-Version 1.0
To Joshua Landau <joshua.landau.ws@gmail.com>
Subject Re: Overriding a global
References <roy-B236C9.15475310122011@news.panix.com> <mailman.3500.1323551240.27778.python-list@python.org> <roy-EC9997.16105310122011@news.panix.com> <mailman.3542.1323688423.27778.python-list@python.org> <4ee671f6$0$29979$c3e8da3$5496439d@news.astraweb.com> <mailman.3569.1323726243.27778.python-list@python.org> <87k4611l4y.fsf@benfinney.id.au> <CAN1F8qWYRSq0oUTzeDn-+SYXdHr7+akAQPSk-R+90Ax7E1FAZQ@mail.gmail.com>
In-Reply-To <CAN1F8qWYRSq0oUTzeDn-+SYXdHr7+akAQPSk-R+90Ax7E1FAZQ@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:rKOhW3DWdefpzHdeTuuZjCxyntJ3GCK1fASIn5VF3x8 fz5H48MvZPeC4kb0TSd1dx9qJXdzcgizSxiaciqoXipoc54BOi Skbr9KJOHwSn4whxP/EvOBY3DzdYUTL/gsxHomA4f+y6fOwo7j 2evUUNJgT6KgPq/43fv+phF3h3B7EXeQOf+NIYuRbOO1mfVgBb 4cKGJXTaU91x0wPpl9ki8kKkfwDRkVg9dJQV+fFSazY+uwFYPH /UxgozZlCiytj/35DBPTYGirn93iruvQ/CuO1hXPpHoSiDSmMa C37YVB5iHLgv+jMWgH8TFoVc+Kx2sJpvVeCWjpaeglBmSC5nwU e0rqsVGotoZmIliZw/wA=
Cc python-list@python.org, Ben Finney <ben+python@benfinney.id.au>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
Reply-To d@davea.name
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3575.1323740790.27778.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1323740790 news.xs4all.nl 6974 [2001:888:2000:d::a6]:47916
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:17100

Show key headers only | View raw


On 12/12/2011 06:48 PM, Joshua Landau wrote:
>>> If a function knows of the presence of a global, it's not asking too
>>> much for it to not re-use the same name in local scope.
>> Yes.
>
> It's just a function wanting to act as-if it were in a different
> environment than its default. By that same reasoning you could state that
> "If a function knows of the presence of a built-in, it's not asking
> too much for it to not re-use the same name in local scope."
> <SNIP>
It's entirely different.  It's only the same if the function actually 
tries to call the built-in, then also wants a local variable with a 
different purpose.  Think a little about what I mean that the function 
"knows of the presence."  I did not say the programmer knows of the 
presence.
-- 

DaveA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Overriding a global Roy Smith <roy@panix.com> - 2011-12-10 15:47 -0500
  Re: Overriding a global MRAB <python@mrabarnett.plus.com> - 2011-12-10 21:07 +0000
    Re: Overriding a global Roy Smith <roy@panix.com> - 2011-12-10 16:10 -0500
      Re: Overriding a global Jean-Michel Pichavant <jeanmichel@sequans.com> - 2011-12-12 12:13 +0100
        Re: Overriding a global Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-12 21:28 +0000
          Re: Overriding a global Dave Angel <d@davea.name> - 2011-12-12 16:43 -0500
            Re: Overriding a global Ben Finney <ben+python@benfinney.id.au> - 2011-12-13 09:27 +1100
              Re: Overriding a global Dave Angel <d@davea.name> - 2011-12-12 20:46 -0500
              Re: Overriding a global Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-13 01:48 +0000
              Re: Overriding a global Ian Kelly <ian.g.kelly@gmail.com> - 2011-12-12 22:50 -0700
              Re: Overriding a global Joshua Landau <joshua.landau.ws@gmail.com> - 2011-12-13 08:34 +0000
              Re: Overriding a global Ian Kelly <ian.g.kelly@gmail.com> - 2011-12-13 12:34 -0700
              Re: Overriding a global Ian Kelly <ian.g.kelly@gmail.com> - 2011-12-13 12:54 -0700
          Re: Overriding a global Jean-Michel Pichavant <jeanmichel@sequans.com> - 2011-12-13 10:54 +0100
            Re: Overriding a global Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-13 11:15 +0000
              Re: Overriding a global Jean-Michel Pichavant <jeanmichel@sequans.com> - 2011-12-13 14:30 +0100
              Re: Overriding a global Jean-Michel Pichavant <jeanmichel@sequans.com> - 2011-12-14 11:14 +0100
              Re: Overriding a global Chris Angelico <rosuav@gmail.com> - 2011-12-14 21:32 +1100
              Re: Overriding a global Jean-Michel Pichavant <jeanmichel@sequans.com> - 2011-12-14 13:05 +0100
                Re: Overriding a global Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-14 12:53 +0000
                Re: Overriding a global Jean-Michel Pichavant <jeanmichel@sequans.com> - 2011-12-14 14:35 +0100
              Re: Overriding a global Chris Angelico <rosuav@gmail.com> - 2011-12-14 23:21 +1100
              Re: Overriding a global Jean-Michel Pichavant <jeanmichel@sequans.com> - 2011-12-14 18:06 +0100
  Re: Overriding a global Terry Reedy <tjreedy@udel.edu> - 2011-12-10 19:14 -0500
  Re: Overriding a global Terry Reedy <tjreedy@udel.edu> - 2011-12-10 19:19 -0500
  Re: Overriding a global Peter Otten <__peter__@web.de> - 2011-12-11 09:14 +0100
  Re: Overriding a global Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2011-12-13 10:15 +0100

csiph-web