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


Groups > comp.lang.python > #47657

Re: "Don't rebind built-in names*" - it confuses readers

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; '(at': 0.04; 'guido': 0.05; 'context': 0.07; 'variables': 0.07; 'string': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'rossum': 0.09; 'python': 0.11; 'jan': 0.12; '(taken': 0.16; 'builtins': 0.16; 'clashes': 0.16; 'long-time': 0.16; 'posters': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'reedy': 0.16; 'stumbling': 0.16; 'wrote:': 0.18; '(not': 0.18; 'bit': 0.19; 'file,': 0.19; 'written': 0.21; 'seems': 0.21; 'saying': 0.22; 'header:User-Agent:1': 0.23; 'relaxed': 0.24; 'post': 0.26; 'least': 0.26; 'header:X-Complaints-To:1': 0.27; 'van': 0.27; 'idea': 0.28; "i'm": 0.30; 'usually': 0.31; 'file': 0.32; 'guess': 0.33; 'but': 0.35; 'there': 0.35; 'should': 0.36; 'clear': 0.37; 'being': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'most': 0.60; 'matter': 0.61; 'first': 0.61; 'making': 0.63; 'become': 0.64; 'more': 0.64; 'worth': 0.66; 'obvious': 0.74; 'me).': 0.84; 'otten': 0.84; 'rusi': 0.91; 'subject:Don': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Peter Otten <__peter__@web.de>
Subject Re: "Don't rebind built-in names*" - it confuses readers
Date Tue, 11 Jun 2013 14:06:05 +0200
Organization None
References <kp5q5o$fj1$1@ger.gmane.org> <mailman.3011.1370934571.3114.python-list@python.org> <2eb38e14-55ea-4fe2-9108-9a13ef120a73@s2g2000pbz.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
X-Gmane-NNTP-Posting-Host p508490cf.dip0.t-ipconnect.de
User-Agent KNode/4.7.3
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
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.3018.1370952362.3114.python-list@python.org> (permalink)
Lines 31
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1370952362 news.xs4all.nl 15948 [2001:888:2000:d::a6]:35924
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:47657

Show key headers only | View raw


rusi wrote:

> On Jun 11, 12:09 pm, Peter Otten <__pete...@web.de> wrote:
>> Terry Jan Reedy wrote:
>> > Many long-time posters have advised "Don't rebind built-in names*.
>>
>> I'm in that camp, but I think this old post by Guido van Rossum is worth
>> reading to put the matter into perspective:
> 
> Not sure what you are saying Peter… If it is this (taken without
> context):
> 
>> (Not that it isn't a good idea to avoid obvious clashes --
>> 'str' for string variables and 'type' for type variables being the
>> most obvious stumbling blocks.)
> 
> then I guess we are saying the same thing??
> 
> If however we consider the context of that message:
> First there was only open, then there came file, and file was
> considered better than open, now again file seems to have disappeared
> from python3… and this message is written in the context of making the
> 'kosherness' of one python generation become the *different*
> kosherness of the next…
> 
> then what the message of the Guido-quote is, is not clear (at least to
> me).

As I understand it we should be a bit more relaxed about the matter of 
shading builtins with local variables than we usually are ;)

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


Thread

Re: "Don't rebind built-in names*" - it confuses readers Peter Otten <__peter__@web.de> - 2013-06-11 09:09 +0200
  Re: "Don't rebind built-in names*" - it confuses readers rusi <rustompmody@gmail.com> - 2013-06-11 04:12 -0700
    Re: "Don't rebind built-in names*" - it confuses readers Peter Otten <__peter__@web.de> - 2013-06-11 14:06 +0200
    Re: "Don't rebind built-in names*" - it confuses readers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-11 13:34 +0000
      Re: "Don't rebind built-in names*" - it confuses readers Rick Johnson <rantingrickjohnson@gmail.com> - 2013-06-11 08:43 -0700
        Re: "Don't rebind built-in names*" - it confuses readers Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-11 17:29 +0100

csiph-web