Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!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; 'false,': 0.07; 'false.': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; '1).': 0.16; 'enough.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.16; 'second': 0.24; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'example': 0.26; 'header:X-Complaints-To:1': 0.26; 'sense': 0.26; 'yield': 0.27; 'looks': 0.29; 'yields': 0.29; 'equal': 0.34; 'false': 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'no,': 0.38; 'test': 0.39; 'does': 0.39; 'to:addr:python.org': 0.40; 'your': 0.60; 'received:194': 0.61; 'charset:windows-1252': 0.62; 'subject:True': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: jmp Subject: Re: True == 1 weirdness Date: Wed, 16 Sep 2015 15:08:26 +0200 References: <0b949fe0-09b4-46b0-b4ac-a85a9bfebfd5@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: paris.sequans.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 In-Reply-To: <0b949fe0-09b4-46b0-b4ac-a85a9bfebfd5@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1442408922 news.xs4all.nl 23814 [2001:888:2000:d::a6]:58974 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:96675 On 09/16/2015 02:16 PM, Blake T. Garretson wrote: >>>> 1 in {1:1} == 1 #test2 >The second test yield False, because True does not equal 1, apparently. Fair enough. No, it yields False because {1:1} == 1 is false. Test 2 looks actually like (1 in {1:1}) and ({1:1} == 1). Which in your example does not make any sense but think of this one: x = 5 3 < x < 10 JM