Serhiy Storchaka added the comment:

round() was used because it is the simplest way to convert fractional numbers 
to integers that doesn't involve strings-to-integer converting (as in int()). 
Perhaps math.trunc() looks a little more appropriate. math.ceil() returns a 
float in 2.7 and is limited by float range. But "1.678 second" don't look more 
correct than "1.678 seconds". My point is that gettext ability of selecting 
plural form shouldn't be used for fractional numbers. It seems to me that a 
fractional number should be formatted with the same form independently from 
it's value (it can be different from plural forms for integer numbers). 
Proposed patch adds a deprecating warning for encouraging users to rewrite 
their code for formatting fractional numbers.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28692>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to