Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!goblin2!goblin.stu.neva.ru!newsfeed1.swip.net!uio.no!nntp.uib.no!svn.schaathun.net!not-for-mail From: Hans Georg Schaathun Newsgroups: comp.lang.python Subject: Re: checking if a list is empty Date: Wed, 11 May 2011 15:05:45 +0100 Organization: University of Bergen Lines: 21 Message-ID: References: <200e93c2-6b87-4113-9c6f-85815e51ea77@28g2000yqu.googlegroups.com> <4dc4b3c5$0$29991$c3e8da3$5496439d@news.astraweb.com> <4dca7db5$0$29980$c3e8da3$5496439d@news.astraweb.com> NNTP-Posting-Host: vannskorpion.bccs.uib.no X-Trace: toralf.uib.no 1305122046 86489 129.177.20.20 (11 May 2011 13:54:06 GMT) X-Complaints-To: abuse@uib.no NNTP-Posting-Date: 11 May 2011 13:54:06 GMT User-Agent: slrn/pre1.0.0-18 (Linux) Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:5118 On 11 May 2011 12:14:46 GMT, Steven D'Aprano wrote: : Not knowing that you can write "if x" instead of "if x == []" is like not : knowing that you can write : : elif condition : : instead of : : else: : if condition My concern was with the reader and not the writer. What could elif mean other than else: if? if x could, for instance, mean "if x is defined". -- :-- Hans Georg