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


Groups > comp.lang.python > #47672

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

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!transit4.readnews.com!panix!not-for-mail
From Grant Edwards <invalid@invalid.invalid>
Newsgroups comp.lang.python
Subject Re: "Don't rebind built-in names*" - it confuses readers
Date Tue, 11 Jun 2013 16:23:38 +0000 (UTC)
Organization PANIX Public Access Internet and UNIX, NYC
Lines 20
Message-ID <kp7iua$d74$1@reader1.panix.com> (permalink)
References <kp5q5o$fj1$1@ger.gmane.org> <CAMjeLr8X_M+zp1zkSGV_wUTyv_e6XCbfhpTmzVzy2t5PuONEjQ@mail.gmail.com> <mailman.3002.1370910429.3114.python-list@python.org>
NNTP-Posting-Host dsl.comtrol.com
X-Trace reader1.panix.com 1370967818 13540 64.122.56.22 (11 Jun 2013 16:23:38 GMT)
X-Complaints-To abuse@panix.com
NNTP-Posting-Date Tue, 11 Jun 2013 16:23:38 +0000 (UTC)
User-Agent slrn/1.0.1 (Linux)
Xref csiph.com comp.lang.python:47672

Show key headers only | View raw


On 2013-06-11, Mark Janssen <dreamingforward@gmail.com> wrote:
>>>         list = []
>>> Reading further, one sees that the function works with two lists, a list of
>>> file names, unfortunately called 'list',
>>
>> That is very good advice in general:  never choose a variable name
>> that is a keyword.
>
> Btw,  shouldn't it be illegal anyway?  Most compilers don't let you do
> use a keyword as a variable name....

We're not talking about keywords.  We're talking about built-ins -- 
which are just global symbols that are pre-imported for your shopping
convenience.  Other than the fact that they're pre-imported for you,
they're no different than symbols imported from any other module.

-- 
Grant Edwards               grant.b.edwards        Yow! Could I have a drug
                                  at               overdose?
                              gmail.com            

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


Thread

Re: "Don't rebind built-in names*" - it confuses readers Mark Janssen <dreamingforward@gmail.com> - 2013-06-10 17:20 -0700
  Re: "Don't rebind built-in names*" - it confuses readers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-06-11 02:53 +0000
  Re: "Don't rebind built-in names*" - it confuses readers Grant Edwards <invalid@invalid.invalid> - 2013-06-11 16:23 +0000

csiph-web