Mark Dickinson <[EMAIL PROTECTED]> added the comment: Here's an updated patch that makes the trailing 'p123' exponent optional in fromhex. (This matches the behaviour of C99's strtod and sscanf; in contrast, Java always requires the exponent.)
I'm beginning to wonder whether the '0x' shouldn't also be optional on input as well, in the same way that it's optional in int(): >>> int('0x45', 16) 69 >>> int('45', 16) 69 This would then allow, e.g., >>> float.fromhex('45') 69.0 Added file: http://bugs.python.org/file10881/hex_float6.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