Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed1a.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; 'from:addr:yahoo.co.uk': 0.04; '(even': 0.05; 'none:': 0.07; 'lawrence': 0.09; 'python:': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'language.': 0.14; "wouldn't": 0.14; '*should*': 0.16; 'leaks': 0.16; 'none.': 0.16; 'objection': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'similarly,': 0.16; 'summarizes': 0.16; 'thinking,': 0.16; 'throw': 0.16; 'language': 0.16; 'wrote:': 0.18; "python's": 0.19; 'machine': 0.22; 'header :User-Agent:1': 0.23; 'tells': 0.24; '---': 0.24; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'team.': 0.31; 'agree': 0.35; 'test': 0.35; 'but': 0.35; 'really': 0.36; 'challenging': 0.38; 'to:addr:python-list': 0.38; 'list,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'received:org': 0.40; 'free': 0.61; 'viruses': 0.61; "you've": 0.63; 'name': 0.63; 'protection': 0.63; 'such': 0.63; 'our': 0.64; 'more': 0.64; 'great': 0.65; 'teach': 0.65; 'antivirus': 0.68; 'received:89': 0.85; 'captain': 0.91; 'baby': 0.95; 'dream': 0.95 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Reference Date: Wed, 05 Mar 2014 12:35:05 +0000 References: <53144e8d$0$2149$426a74cc@news.free.fr> <1d1dfa1b-b715-4d8f-9c12-f0d3dc1a22c9@googlegroups.com> <85ppm3httu.fsf@benfinney.id.au> <20140303155112.46e34ff8@bigbox.christie.dr> <87siqy7whs.fsf@elektro.pacujo.net> <53155c15$0$2923$c3e8da3$76491128@news.astraweb.com> <164d209c-ba5e-449f-bc25-c27ebfb1fc0f@googlegroups.com> <8761ntp3ja.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-89-240-165-66.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: <8761ntp3ja.fsf@elektro.pacujo.net> X-Antivirus: avast! (VPS 140304-1, 04/03/2014), Outbound message X-Antivirus-Status: Clean 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: 43 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1394022935 news.xs4all.nl 2880 [2001:888:2000:d::a6]:53845 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:67840 On 05/03/2014 06:23, Marko Rauhamaa wrote: > Rustom Mody : > >> * ... which summarizes my objection in this thread: Python's 'is' >> leaks the machine abstraction. 'id' does it legitimately (somewhat), >> 'is' does it illegitimately > > I agree that the Python data model can be exceedingly challenging to a > beginner. However, I wouldn't throw the baby away with the bathwater, > but look for ingenious ways to teach it. [snip Java] > > Similarly, in Python: > > if the_list == None: > > *should* work (even if there's no such stipulation in Python's reference > material), but why wouldn't you use the more natural: > > if the_list is None: > > > Marko > Really great thinking, test the name the_list, which strangely enough tells me that this beast is a list, in the same way that THIS_IS_A_CONSTANT is a constant, to see if it's None. Congratulations, you've been promoted to captain of my dream team. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com