Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 Newsgroups: comp.lang.python Subject: Re: for / while else doesn't make sense Date: Sun, 22 May 2016 14:14:47 -0400 Lines: 11 Message-ID: References: <573EC62F.4090401@lucidity.plus.com> <573f9322$0$1616$c3e8da3$5496439d@news.astraweb.com> <5741cde9$0$1587$c3e8da3$5496439d@news.astraweb.com> <1463938237.1828035.615243249.4F306225@webmail.messagingengine.com> <1463940887.1835433.615265121.35FBEC6D@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de tjQPs0ZX88qOYi8vye9jlAGETxIfJFH8+ltjjPybD3Kg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '**)': 0.09; '22,': 0.09; 'integers': 0.09; 'received:internal': 0.09; 'subject:while': 0.09; 'python': 0.10; '"/"': 0.16; 'division,': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'operation.': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:10.202.2.212': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:psf.io': 0.16; 'subject:make': 0.16; 'subtraction': 0.16; 'wrote:': 0.16; 'saying': 0.22; '(you': 0.23; 'header:In-Reply-To:1': 0.24; 'least': 0.27; 'mathematical': 0.27; 'arithmetic': 0.29; 'division': 0.29; 'operators': 0.29; 'language.': 0.32; 'surely': 0.33; 'gives': 0.35; "isn't": 0.35; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'no,': 0.38; 'received:66': 0.38; 'to:addr:python.org': 0.40; 'header:Message- Id:1': 0.61; 'subject: / ': 0.63; 'fact,': 0.67; 'therefore': 0.67; 'subject:else': 0.84; 'subject:sense': 0.84 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=78oUD00KXVkPJ1OZEQr7qyACejc=; b=P4kRcO uoCzMtCVzVJX6wbksei8QdZVy0CprWWytgJrYHOKXPn1Wp+P+HbjEWHGbyZWSety 2U8cwujCZ2RyhweVP7Vx449dGJ+DXDzEvkt35OhM5Uw2YlZ/21Jo5Ix3twu/bQbc 2LFQBctvnsj1S9uQVj82Q8Re7mFS29nZLoW3M= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=78oUD00KXVkPJ1O ZEQr7qyACejc=; b=knWseODcobvbdoPF1F2NgfWAsgj+7ilZizVOwJ43An8qPAN 5v14GF45DgSjxqW2Q5wzbjbvQgBLuguDzNWY62DEqU4VkCH82vU7ybUxrUrmsbop qzeyrtWPqq2OHYX0++Q7QVBfo5uVulRZn6x4UqbJp9an35VuJoZt/yRLrhqQ= X-Sasl-Enc: 2fcq3FKu+q/HeXymnOLKcJ3ou0eWGUblW8TpiHJvZMNX 1463940887 X-Mailer: MessagingEngine.com Webmail Interface - ajax-37b57599 In-Reply-To: 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: <1463940887.1835433.615265121.35FBEC6D@webmail.messagingengine.com> X-Mailman-Original-References: <573EC62F.4090401@lucidity.plus.com> <573f9322$0$1616$c3e8da3$5496439d@news.astraweb.com> <5741cde9$0$1587$c3e8da3$5496439d@news.astraweb.com> <1463938237.1828035.615243249.4F306225@webmail.messagingengine.com> Xref: csiph.com comp.lang.python:108956 On Sun, May 22, 2016, at 13:55, Jon Ribbens wrote: > No, in Python integers are closed under the standard arithmetic > operators (+ - * / % **) Z is not closed under standard division, as surely as N isn't closed under subtraction and R isn't closed under exponentiation. That is a mathematical fact, not one about any particular language. What you are saying is that Python 2's "/" is _not_ standard division (you want to talk about the principle of least surprise...), and is therefore _not_ a standard arithmetic operation. It's not Euclidean division, either, since it gives a negative remainder for negative divisors.