Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1a.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python,': 0.02; 'operator': 0.03; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'mostly': 0.14; 'finney': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'header:User-Agent:1': 0.23; 'people,': 0.24; 'compare': 0.26; 'header:X-Complaints- To:1': 0.27; 'usually': 0.31; 'commonly': 0.31; 'writes:': 0.31; 'regular': 0.32; 'advice': 0.35; 'but': 0.35; 'received:com.au': 0.36; "i'll": 0.36; 'two': 0.37; 'ben': 0.38; 'to:addr:python- list': 0.38; 'short': 0.38; 'bad': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'answer:': 0.84; 'received:125': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Re: Reference Date: Tue, 04 Mar 2014 08:10:21 +1100 References: <53144e8d$0$2149$426a74cc@news.free.fr> <1d1dfa1b-b715-4d8f-9c12-f0d3dc1a22c9@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: vmx15867.hosting24.com.au X-Public-Key-ID: 0xBD41714B X-Public-Key-Fingerprint: 9CFE 12B0 791A 4267 887F 520C B7AC 2E51 BD41 714B X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-gpg.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:Wd7UtQf440f+rKeZ6trGlQOvrf4= 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1393881307 news.xs4all.nl 2918 [2001:888:2000:d::a6]:58114 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:67581 Rustom Mody writes: > Short answer: Avoid using 'is'. This is bad advice in a Python forum. The ‘is’ operator is commonly used in Python, so please don't advise against it in an unqualified “short answer”. > Long answer: http://www.beyondwilber.ca/healing-thinking/non-identity-korzybski.html Interesting, but mostly a distraction for the querent here. Short answer: Use ‘use’ any time you need to compare object identity. You usually do not need to compare object identity. -- \ “Some people, when confronted with a problem, think ‘I know, | `\ I'll use regular expressions’. Now they have two problems.” | _o__) —Jamie Zawinski, in alt.religion.emacs | Ben Finney