[issue3008] Let bin() show floats
Alexander Belopolsky
report at bugs.python.org
Fri May 30 15:55:25 CEST 2008
Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:
I like the idea in general. It is way too common for people to be
confused by decimal representation of floats, so an obvious mechanism to
display the true value will be helpful.
I don't think a promiscuous bin() will lead to obscure bugs. Antoine
will have to give a specific example to convince me otherwise. I can
see, that extending :b format to floats may be a problem, but this is
not being proposed.
As far as the proposed implementation goes, I don't like the fact that
it always returns a fixed rather than floating point notation. (Try
vis(1e100)). I think it should behave somewhat like "%g" format.
If bin() is extended to floats, it may become confusing that hex() and
oct() are not similarly extended.
----------
nosy: +belopolsky
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3008>
_______________________________________
More information about the Python-bugs-list
mailing list