[issue46780] Allow Fractions to return 1/6 for "0.17", "0.167", "0.1667", etc.

Lee Newberg report at bugs.python.org
Thu Feb 17 13:57:23 EST 2022


Lee Newberg <github at quantconsulting.com> added the comment:

> One more example: what interval is implied by an input string of "1600"? Is it (1550, 1650)? Or (1595, 1605)? Or even (1599.5, 1600.5).

The rule would be to look at the last digit supplied and assume that the rounding is there.  So "1600" gives [1599.5, 1600.5) and "16e2" gives [1550, 1650).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46780>
_______________________________________


More information about the Python-bugs-list mailing list