Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Anthony Papillion Newsgroups: comp.lang.python Subject: Why do these statements evaluate the way they do? Date: Sat, 07 May 2016 01:36:48 -0500 Lines: 18 Message-ID: References: <9D4F2568-405C-419B-9B18-7376B34143CD@cajuntechie.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de 25RN06VCxbuM5EPS2PZ7CAs3WcBNa6OoUMyaqpbUmycw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.036 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'statements': 0.09; 'subject:Why': 0.09; 'equal.': 0.16; 'from:addr:anthony': 0.16; 'reason.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'to:name:python list': 0.16; 'fairly': 0.22; 'trying': 0.22; 'header:User-Agent:1': 0.26; 'example': 0.26; 'figure': 0.27; 'device': 0.28; "i'm": 0.30; 'received:184': 0.30; 'false': 0.35; 'identity': 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'say': 0.37; 'someone': 0.38; 'why': 0.39; 'subject:the': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'evaluate': 0.72; 'mail.': 0.75; 'hoping': 0.77 User-Agent: K-9 Mail for Android X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <9D4F2568-405C-419B-9B18-7376B34143CD@cajuntechie.org> Xref: csiph.com comp.lang.python:108254 I'm trying to figure out why the following statements evaluate the way they= do and I'm not grasping it for some reason=2E I'm hoping someone can help = me=2E 40+2 is 42 #evaluates to True But 2**32 is 2**32 #evaluates to False This is an example taken from a Microsoft blog on the topic=2E They say th= e reason is because the return is based on identity and not value but, to m= e, these statements are fairly equal=2E Can someone clue me in? Anthony --=20 Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E