[issue3008] Let bin() show floats

Alexander Belopolsky report at bugs.python.org
Fri May 30 20:53:40 CEST 2008


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

Another problem with bin() on floats is that it will be a one-way street
because as far as I know, there is no function to convert a binary
string back to a float.

My last thought on this issue is that it will be helpful to add
tobase(f, n) and frombase(s,n) functions to math module (and I withdraw
my suggestion of using %g-like notation due to the conflict between E
for exponent and E for 0xE).  On the other hand, there is no need to
mess up with builtin bin/oct/hex because with math.tobase float-capable
extensions will be trivially implementable.

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


More information about the Python-bugs-list mailing list