From: | "Michał Górny" <mgorny@g.o> | ||
---|---|---|---|
To: | gentoo-portage-dev@l.g.o | ||
Subject: | Re: [gentoo-portage-dev] [PATCH] localized_size(): fix rounding in Python 2. | ||
Date: | Mon, 11 Aug 2014 21:07:11 | ||
Message-Id: | 20140811230604.35727d99@pomiot.lan | ||
In Reply to: | [gentoo-portage-dev] [PATCH] localized_size(): fix rounding in Python 2. by "Michał Górny" |
1 | Dnia 2014-08-06, o godz. 19:12:40 |
2 | Michał Górny <mgorny@g.o> napisał(a): |
3 | |
4 | > In Python 2, the '/' division operator defaults to integer division when |
5 | > given integer argument. Therefore, the calculated size is trimmed before |
6 | > we attempt to round it up. Instead, convert it to float first to |
7 | > guarantee floating point division. |
8 | |
9 | This one got superseded by the __future__ division patch. |
10 | |
11 | -- |
12 | Best regards, |
13 | Michał Górny |
File name | MIME type |
---|---|
signature.asc | application/pgp-signature |