[issue3008] Let bin() show floats
Mark Dickinson
report at bugs.python.org
Fri Jun 20 14:38:22 CEST 2008
Mark Dickinson <dickinsm at gmail.com> added the comment:
The patch looks good to me.
It's a bit unfortunate that -0.0 doesn't round-trip correctly (the sign
of the zero gets lost):
>>> eval(bin(-0.0))
0.0
I don't know whether it's worth special-casing this; the output would
have to be in a different format: '-0b0 * 2.0 ** 0' isn't good enough,
since unary minus has higher precedence than multiplication.
----------
nosy: +marketdickinson
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3008>
_______________________________________
More information about the Python-bugs-list
mailing list