From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3B01E13877A for ; Mon, 11 Aug 2014 21:06:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 03036E0CDD; Mon, 11 Aug 2014 21:06:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7663CE0CDC for ; Mon, 11 Aug 2014 21:06:42 +0000 (UTC) Received: from pomiot.lan (77-255-25-239.adsl.inetia.pl [77.255.25.239]) (using SSLv3 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id ACBB233FCF3; Mon, 11 Aug 2014 21:06:40 +0000 (UTC) Date: Mon, 11 Aug 2014 23:07:02 +0200 From: =?ISO-8859-2?B?TWljaGGzIEfzcm55?= To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] [PATCH] Use __future__ to enable floating-point division of integers in Python 2. Message-ID: <20140811230702.007dcd88@pomiot.lan> In-Reply-To: <1407786694-7143-1-git-send-email-mgorny@gentoo.org> References: <1407786694-7143-1-git-send-email-mgorny@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.24; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/ZmbPlFAWGYJwWQ=p=yF1OoE"; protocol="application/pgp-signature" X-Archives-Salt: ef66832e-52ea-424b-ae73-54e042a81ce8 X-Archives-Hash: 36c862e34f2c80203ff3a0ec7cf6c736 --Sig_/ZmbPlFAWGYJwWQ=p=yF1OoE Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable Dnia 2014-08-11, o godz. 21:51:34 Micha=B3 G=F3rny napisa=B3(a): > In Python 2, the division ('/') operator defaults to integer > (truncating) division when given integer argument. In Python 3, it > performs floating-point division unconditionally instead. To overcome > this difference and get a consistent behavior, integers were converted > to floats explicitly in a few places. >=20 > Instead, use a simpler 'from __future__ import division' statement that > enables floating-point division globally in Python 2. Use it in all > relevant files to get a consistent behavior, and use '//' appropriately > whenever integer division is desired. More specifically, this one's in git. Sorry for the extra thread. --=20 Best regards, Micha=B3 G=F3rny --Sig_/ZmbPlFAWGYJwWQ=p=yF1OoE Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJT6TB2XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2REJCMDdDQzRGMERBRDA2RUEwQUZFNDFC MDdBMUFFQUVGQjQ0NjRFAAoJELB6GurvtEZOgwQP/2JtMR7zlASqDOF3Fl25V5kU 2anf3S19gtWhBcpQcQpGfowF2dGXH/IXKNayDVy87anP7rp7CILAtKFiW0n4TTrg 7WQMboas7HRrguvQRb6oOynnD5vud9dVagXCYWf/g8nH3vCXOvDzVY7tANPxJeKK XZe8ddaXI20gSeDghohQ2+FP26YquTlcDWDNPRZzBezVzw/IGqC5r3NDcXCpL41/ xhTAq+XSP8rPoWR4VZDQoFZpyM703BPK1QH9mEtYDn1n37gZC4QgG3sjZP1m2KLZ obp2cCmho33Dipc2mi03tApGZrxPT2t5MDgMpmHn0BWEDF71shB6HdaERnkY3Gle eiMZAALSmVaizIef2LhdJ5QL7fsUF/+Fc8OFKfvK1/t3z0LX7Z4pmgIw1KPXIrr3 g/ehD/RRyKCFlls4YdMDvhm8qb/rDM5rfJb6cxFbOtTb5HKNJFNM2LQ5Oy4OTYJA WiBoA/mx7wK9qRvp95CkbgqscRDr2pXy0UDeTpTX14Xc2Zjb/jS/HR+N3oF4rHOw lawqmEVRA750+6TxqTxYBhJ5IvukuJhymYl3hmr8Q6j+Qz2l82+34QErbx77O/aS T1M2wfysb7nO0zSvG/RMuVHLk2+gCtjhuJREUmQlcgwsDD7tFnBJcbMgH6g2p+4g 5W//HJPLBkbI1SVWRHi6 =PiWr -----END PGP SIGNATURE----- --Sig_/ZmbPlFAWGYJwWQ=p=yF1OoE--