Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!81.171.88.16.MISMATCH!hq-usenetpeers.eweka.nl!hq-usenetpeers.eweka.nl!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.06; 'variables': 0.07; 'blue': 0.09; 'dan': 0.09; 'exist,': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'sure,': 0.09; '~ethan~': 0.09; 'python': 0.11; 'distinct': 0.16; 'filename:fname piece:signature': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'feb': 0.22; '>>>': 0.22; 'header:User- Agent:1': 0.23; 'helpful': 0.24; "i've": 0.25; 'header:In-Reply- To:1': 0.27; 'function': 0.29; 'went': 0.31; 'code': 0.31; "d'aprano": 0.31; 'go.': 0.31; 'steven': 0.31; 'file': 0.32; 'but': 0.35; 'version': 0.36; 'that!': 0.36; 'thank': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'color': 0.61; 'took': 0.61; 'received:173': 0.61; 'first': 0.61; 'stand': 0.64; '1997': 0.84; '2015': 0.84; 'subject:Practices': 0.84; 'favour': 0.91 Date: Fri, 27 Feb 2015 23:51:49 -0800 From: Ethan Furman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Python Worst Practices References: <54f1154c$0$12985$c3e8da3$5496439d@news.astraweb.com> <54f161fd$0$12991$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: <54f161fd$0$12991$c3e8da3$5496439d@news.astraweb.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="h4FbfdilhQfqhcEAUX3V0F7WdnLTofdn3" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 61 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1425109954 news.xs4all.nl 2837 [2001:888:2000:d::a6]:33680 X-Complaints-To: abuse@xs4all.nl X-Received-Body-CRC: 2809136539 X-Received-Bytes: 5162 Xref: csiph.com comp.lang.python:86611 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --h4FbfdilhQfqhcEAUX3V0F7WdnLTofdn3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02/27/2015 10:36 PM, Steven D'Aprano wrote: > Dan Sommers wrote: >=20 >> On Sat, 28 Feb 2015 12:09:31 +1100, Steven D'Aprano wrote: >> >>> There's no harm in calling a local variable "id", if you don't use th= e >>> built-in id() inside that function. That's one of the reasons why >>> functions exist, so that the names you use inside a function are dist= inct >>> from those outside. >> >> And thank goodness for that! I've been writing Python code since 1997= >> and version 1.5.,=C2=B9 and I still do a double take when e= macs >> colors all my ids that faint blue that means "builtin." >=20 > Although it is not helpful for people using screen-readers, and may be = of > limited use to the colour-blind, I am in favour of colourising built-in= s so > they stand out. Sure, for the ones I use as built-ins. But I went through the color file= for vim and took out the built-ins I use regularly as variables -- and 'id' was the first one to go. -- ~Ethan~ --h4FbfdilhQfqhcEAUX3V0F7WdnLTofdn3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJU8XOYAAoJENZ7D1rrH75NpUMP/1s6A00mWFnX84K5cFIwX1qY 2Y1b0PPtRk3wImtql+ZWqQf/B4s7C+6oF48vuJLZkg2SmWj7fQcuezrycE65huPF KPaB5LntCPSqfnhBM2vhZI3XzR/as6oWfFW2QGeQp4iZSTUnXFo/gn5Z6r6xUuyR sOTZ+lTClFVZbpIktpoHM+K+fELsnM0mqpLhQPFP+I4NVHintbxsZDgKWPYoM0nu OOl2n9Q8P7Zl49hc6z8/g5cEeMbBcNX6LBwv+HgAlf2U0Zxzh0uzvUjl6eWgruEY 75YKBpuhxRD87QQoQA2pjRqJ+sPSW7c3X+cS0vlDQnFWoLj4Q+fkXsCdbk+QwKQv Yo2p6B4dqU+bEqJg2dKfwOkEoyDNQnZ5KUTWulofc6EFEjL03Yn5dYgAn/7K0lQ2 epY3CrQPtiLZRTQMAyB2e7lqRt6Zav1sah59hssDdI5VUizi3h3/qBy+HgrQQhJO 1v+9PMwVgTTKl57DR0VjbeGxTm1Cvv7SH5TZg3jDOXB5YhlnwH+MQ+7fLDGxdKjD 67rPJpJvbwr9IRdkGSKmPNQOoRjECTRH97KmqaPYzvOgJUGw4d0UMh2EZq79oBPO wFDhV90R9lQz+SmwORu2Ei9PDlwpWs3mq4D0agWM3jDNADdD/rNW8LJmUgvqVgV+ bUFQ+DqmjbufPB06oFzg =Hvrc -----END PGP SIGNATURE----- --h4FbfdilhQfqhcEAUX3V0F7WdnLTofdn3--