Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; '(at': 0.03; '(python': 0.05; 'completeness': 0.05; 'instance': 0.05; 'python': 0.08; '3.x': 0.09; 'confuse': 0.09; '>>>': 0.12; '(list)': 0.16; '*really*': 0.16; '712': 0.16; 'affiliates,': 0.16; 'confusing.': 0.16; 'currencies': 0.16; 'insist': 0.16; 'opened,': 0.16; 'received:155.180': 0.16; 'received:159.53': 0.16; 'received:169.70': 0.16; 'received:169.70.190': 0.16; 'received:172.18.0': 0.16; 'received:bankone.net': 0.16; 'received:exchad.jpmchase.net': 0.16; 'received:jpmchase.com': 0.16; 'received:jpmchase.net': 0.16; 'received:svr.bankone.net': 0.16; 'solicitation': 0.16; 'subject:behavior': 0.16; 'url:disclosures': 0.16; 'url:jpmorgan': 0.16; 'tries': 0.16; 'subject:list': 0.19; 'keyword': 0.19; 'header:In-Reply-To:1': 0.21; 'applicable,': 0.23; 'correct,': 0.23; 'herein': 0.23; 'received:169': 0.25; 'received:169.254': 0.25; 'later': 0.26; 'example': 0.27; 'reflect': 0.28; 'bugs': 0.29; 'least': 0.30; 'chase': 0.30; 'received:155': 0.30; 'received:159': 0.30; 'received:169.254.1': 0.30; 'calling': 0.31; 'print': 0.31; 'header:Received:8': 0.32; 'usage': 0.32; '(including': 0.32; 'does': 0.33; 'to:addr:python-list': 0.33; 'list': 0.33; 'things': 0.33; 'showing': 0.34; 'thank': 0.35; 'received:172.18': 0.35; 'phone:': 0.36; '(with': 0.36; 'format.': 0.36; 'accepted': 0.36; 'charset:us-ascii': 0.36; 'change': 0.37; 'accuracy': 0.37; 'arising': 0.37; 'could': 0.38; 'but': 0.38; 'data': 0.38; 'purposes': 0.38; 'subject:: ': 0.38; 'comments': 0.39; 'legally': 0.39; 'list,': 0.39; 'to:addr:python.org': 0.39; 'under': 0.40; 'happen': 0.60; 'to:2**2': 0.61; 'you.': 0.62; 'human': 0.62; 'subject': 0.62; 'market': 0.63; 'virus': 0.63; 'free': 0.63; 'note:': 0.63; 'ever': 0.64; 'applicable': 0.65; 'co.,': 0.65; 'contact': 0.66; 'relating': 0.67; 'legal': 0.70; 'offer': 0.71; 'become': 0.72; 'sale': 0.76; 'bank': 0.76; 'investment': 0.78; 'purchase': 0.83; 'affiliates.': 0.84; 'prices,': 0.84; 'defect': 0.91; 'which.': 0.91; 'instrument': 0.95; 'notice.': 0.96 X-DKIM: Sendmail DKIM Filter v2.5.6 sf2.jpmchase.com p4QJYBhQ007057 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=jpmchase.com; s=smtpout; t=1306438451; bh=H3dWsZMM+wE8oHoMjw1tMhJiPwigZWTCmY4NHYf FANg=; h=From:To:Date:Subject:Message-ID:References:In-Reply-To: Content-Transfer-Encoding:MIME-Version:Content-Type; b=aEcPtn2Mpc6 VZjDA0x7L2ya757lDgqgdvwKsgnqujr+3lEnyJM9kBRM7fExf8LmA1yyvbts82xgFmo SVLo+bSNMocQZZ8dcWD+Z54eUGaY0gTxve6dqXXr1MGF3wtfEM/UYDu0zrYUkvQGoNk VCiAy4lMgzuAl4q3kpjUqHOBFg= From: "Prasad, Ramit" To: "'Terry Reedy'" , "'python-list@python.org'" , "'Uncle Ben'" Date: Thu, 26 May 2011 15:34:01 -0400 Subject: RE: Puzzled by list-appending behavior Thread-Topic: Puzzled by list-appending behavior Thread-Index: Acwb1ai4VU4+0W9cSa22aPvjt1afiQABaQRg References: <16c21256-48df-416a-971f-de49ca4cc981@x6g2000yqj.googlegroups.com> <201105261718.36646.akabaila@pcug.org.au> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-DLP-FWD: Yes Content-Type: text/plain; charset="us-ascii" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 37 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1306439782 news.xs4all.nl 49038 [::ffff:82.94.164.166]:57363 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:6339 >> And why do you insist on calling an instance of list, "list"? Even a=0D= =0A>> human reader will confuse which is which=2E What you are showing is a= n=0D=0A>> example how confusing things become when a keyword (list) is=0D= =0A>> over-written (with list instance)=2E=0D=0A=0D=0A> (Minor note: 'list'= is not a keyword (if it were, it could not be =0D=0A>over-ridden) but it i= s a builtin=2E) You are correct, it is confusing=2E =0D=0A>Such usage will = also lead to bugs if one ever tries to access the >class =0D=0A>as 'list' l= ater in the program=2E=0D=0A=0D=0A=0D=0AAn example of overriding built-ins = you *really* do not want to happen (python 2=2E6=2E4): =0D=0A>>> True =3D F= alse=0D=0A>>> True =3D=3D False=0D=0ATrue=0D=0A>>> print True=0D=0AFalse=0D= =0A=0D=0AFrom what I can tell, this does not work in Python 3=2Ex (at least= not in Python 3=2E1=2E1)=0D=0A=0D=0A=0D=0A=0D=0ARamit=0D=0A=0D=0A=0D=0A=0D= =0ARamit Prasad | JPMorgan Chase Investment Bank | Currencies Technology=0D= =0A712 Main Street | Houston, TX 77002=0D=0Awork phone: 713 - 216 - 5423=0D= =0A=0D=0A=0D=0AThis communication is for informational purposes only=2E It = is not=0D=0Aintended as an offer or solicitation for the purchase or sale o= f=0D=0Aany financial instrument or as an official confirmation of any=0D=0A= transaction=2E All market prices, data and other information are not=0D=0Aw= arranted as to completeness or accuracy and are subject to change=0D=0Awith= out notice=2E Any comments or statements made herein do not=0D=0Anecessaril= y reflect those of JPMorgan Chase & Co=2E, its subsidiaries=0D=0Aand affili= ates=2E=0D=0A=0D=0AThis transmission may contain information that is privil= eged,=0D=0Aconfidential, legally privileged, and/or exempt from disclosure= =0D=0Aunder applicable law=2E If you are not the intended recipient, you=0D= =0Aare hereby notified that any disclosure, copying, distribution, or=0D=0A= use of the information contained herein (including any reliance=0D=0Athereo= n) is STRICTLY PROHIBITED=2E Although this transmission and any=0D=0Aattach= ments are believed to be free of any virus or other defect=0D=0Athat might = affect any computer system into which it is received and=0D=0Aopened, it is= the responsibility of the recipient to ensure that it=0D=0Ais virus free a= nd no responsibility is accepted by JPMorgan Chase &=0D=0ACo=2E, its subsid= iaries and affiliates, as applicable, for any loss=0D=0Aor damage arising i= n any way from its use=2E If you received this=0D=0Atransmission in error, = please immediately contact the sender and=0D=0Adestroy the material in its = entirety, whether in electronic or hard=0D=0Acopy format=2E Thank you=2E=0D= =0A=0D=0APlease refer to http://www=2Ejpmorgan=2Ecom/pages/disclosures for= =0D=0Adisclosures relating to European legal entities=2E