* Re: [gentoo-portage-dev] [PATCH] localized_size(): fix rounding in Python 2.
@ 2014-08-11 21:06 99% ` Michał Górny
0 siblings, 0 replies; 1+ results
From: Michał Górny @ 2014-08-11 21:06 UTC (permalink / raw
To: gentoo-portage-dev
[-- Attachment #1: Type: text/plain, Size: 438 bytes --]
Dnia 2014-08-06, o godz. 19:12:40
Michał Górny <mgorny@gentoo.org> napisał(a):
> In Python 2, the '/' division operator defaults to integer division when
> given integer argument. Therefore, the calculated size is trimmed before
> we attempt to round it up. Instead, convert it to float first to
> guarantee floating point division.
This one got superseded by the __future__ division patch.
--
Best regards,
Michał Górny
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2014-08-06 17:12 [gentoo-portage-dev] [PATCH] localized_size(): fix rounding in Python 2 Michał Górny
2014-08-11 21:06 99% ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox