Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.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.053 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.01; '(python': 0.07; 'cc:addr :python-list': 0.11; 'division.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'programmers.': 0.16; 'subject:Java': 0.16; 'truncate': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'integer': 0.24; 'cc:2**0': 0.24; 'subject:/': 0.26; 'values': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'gives': 0.31; '>>>>': 0.31; 'but': 0.35; 'received:google.com': 0.35; 'question,': 0.38; 'little': 0.38; 'behavior': 0.77; '2015': 0.84; 'bite': 0.84; 'float,': 0.84; 'subject:experience': 0.84; '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=Me4qR/OvuUgPY8RQzBpNSfWlHKz9qfQDxs0+GRoFieI=; b=rrlE31KMaieAKdJV1V8ROZPL4he1ea/Tgd9+VY+axasRAOt9rAB/r/bW50N8RF6ksw LqkJ6xPaSebv3xwoW7oCjyXJEssWSxGh5vHH22RC6vRCmgX3jfBCGiVyErpfQ2WZaG3N voBSQlouIRpTtPMHDF2XrURCwdn7nEE87NG9wm8hEO0trpEtAqXmk+8nweaXnUQG7WWV HW150NgfjOmeTd/OQvgTuDQQZIXYf3HFoHsaJ3s7WuZM59PRdzhQBHYnA3OGY84ykgCP lZE8VNjvyj4awwZpN/GMuQtFudlbRmauhFrd8DMOQhppSFD2Y/N9aReHtXoAHLxVZiXG W7Gw== MIME-Version: 1.0 X-Received: by 10.107.160.202 with SMTP id j193mr29587014ioe.43.1430761250226; Mon, 04 May 2015 10:40:50 -0700 (PDT) In-Reply-To: <5547ad48$0$2864$e4fe514c@news.xs4all.nl> References: <87r3qwid3u.fsf@Equus.decebal.nl> <5547ad48$0$2864$e4fe514c@news.xs4all.nl> Date: Tue, 5 May 2015 03:40:50 +1000 Subject: Re: Bitten by my C/Java experience 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.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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1430761253 news.xs4all.nl 2829 [2001:888:2000:d::a6]:34895 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:89918 On Tue, May 5, 2015 at 3:32 AM, Irmen de Jong wrote: > That is a broad question, but one thing that comes to mind is the current (python 3) > behavior of integer division. It gives the exact result and doesn't truncate to integers: > > >>>> 5/4 > 1.25 Using the word "exact" around non-integer values can be a little ambiguous, since floats are often inexact. But yes, int/int -> float, and yes, it WILL bite C programmers. ChrisA