Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4a.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.045 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.01; 'assignment': 0.07; 'computing,': 0.07; 'variables': 0.07; 'pretend': 0.09; 'subject:number': 0.09; 'cc:addr:python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'infinity,': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'aug': 0.22; 'cc:addr:python.org': 0.22; "aren't": 0.24; 'mathematical': 0.24; 'fine': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; 'subject:list': 0.30; 'message- id:@mail.gmail.com': 0.30; 'sense': 0.34; 'subject:the': 0.34; 'equal': 0.35; 'received:google.com': 0.35; 'problems': 0.38; 'itself': 0.39; 'even': 0.60; 'strictly': 0.61; "you're": 0.61; 'places': 0.64; 'telling': 0.64; 'computers': 0.72; 'subject:get': 0.81; '4:26': 0.84; 'console,': 0.84; 'maths': 0.84; 'same,': 0.91; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=nJX79MYyZuxM94FHOdfSDlv2hJaLWUPdwT2E/vbU76M=; b=RWToqiZAgGmlB13j0uJ1q/cIDbBMINKak0bJaIFHHCcVqX20Evlfr6Lo+eVqfTnk8w 3pZLoRZ6TCBaG12bw51eBRhqmJ7qQ+8NYpx2sTxmMBBdadSxW6v4WmfbU6KLd+eOUWnu ydHcYMkQx23dO+wV6UfRmZYKI0MutaDuwhjwkfNe3pz9cAykOEtdYEOW7WBiD2NjRljQ ppCbFZPDP2pPk73h0DvQ7xbQI8weh7fBof0dtJcyjh5acJSHX4xYu6fvUkufGPi2B2R9 pp2HY81K5HKFT/QVSXLIJ3Pvq/Kryw1aS0RegT5H/L3l7B3QWIGOpvmuSSEkvhltNXHd BR3A== MIME-Version: 1.0 X-Received: by 10.42.216.148 with SMTP id hi20mr26920962icb.12.1407697439887; Sun, 10 Aug 2014 12:03:59 -0700 (PDT) In-Reply-To: <8c41d779-0c26-430a-a915-08c2b962e0e7@googlegroups.com> References: <53E658CD.5020904@gmail.com> <53e59035$0$29998$c3e8da3$5496439d@news.astraweb.com> <338e8fb0-c9ec-462a-b560-1c1ff77de17e@googlegroups.com> <154cc342-7f85-4d16-b636-a1a953913c98@googlegroups.com> <8c41d779-0c26-430a-a915-08c2b962e0e7@googlegroups.com> Date: Mon, 11 Aug 2014 05:03:59 +1000 Subject: Re: how to get the ordinal number in list From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1407697448 news.xs4all.nl 2829 [2001:888:2000:d::a6]:40550 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75999 On Mon, Aug 11, 2014 at 4:26 AM, Rustom Mody wrote: > > Its when we have variables that are assigned in multiple places that > we start seeing mathematical abominations like > x = x+1 That's an abomination to you because it breaks your mathematical model. It's fine to a computer, which has a sense of time. And it even can be strictly true. Consider: >>> x = 2.0**53 >>> x = x + 1 >>> x == x + 1 True x is clearly not infinity, yet it's equal to itself plus one. If you're going to try to pretend that maths and computers are exactly the same, you have a LOT of problems to deal with. In computing, assignment and reassignment aren't at all problematic, and neither is printing to the console, so please stop telling people off for using them. ChrisA