Mark Dickinson <[EMAIL PROTECTED]> added the comment: In the spirit of being "liberal in what you accept, but strict in what you emit", here's a version that makes both the leading '0x' and the trailing 'p...' exponent optional on input. Both of these are still produced on output.
Note that this version is still perfectly interoperable with C99 and Java 1.5+: fromhex accepts anything produced by C and Java (e.g. via C's '%a', or Java's toHexString), and the output of hex can be read by C99's strtod/sscanf and Java's Double constructor, and/or used as hex literals in C or Java source. Added file: http://bugs.python.org/file10882/hex_float7.patch _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3008> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com