[issue23602] Implement __format__ for Fraction

Tuomas Suutari report at bugs.python.org
Sun Mar 8 10:31:12 CET 2015


Tuomas Suutari added the comment:

Serhiy Storchaka wrote:
>>>> from fractions import Fraction as F
>>>> format(F(1, 3), '.30f')
> '0.333333333333333333333333333300'

Good catch! I'll try to fix this and add some more test cases.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23602>
_______________________________________


More information about the Python-bugs-list mailing list