Message69579
| Author | mark.dickinson |
|---|---|
| Recipients | alexandre.vassalotti, amaury.forgeotdarc, belopolsky, gvanrossum, mark.dickinson, pitrou, rhettinger, terry.reedy |
| Date | 2008-07-12.07:13:15 |
| SpamBayes Score | 0.0018186569 |
| Marked as misclassified | No |
| Message-id | <1215846808.68.0.106762891444.issue3008@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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 |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008-07-12 07:13:29 | mark.dickinson | set | spambayes_score: 0.00181866 -> 0.0018186569 recipients: + mark.dickinson, gvanrossum, rhettinger, terry.reedy, amaury.forgeotdarc, belopolsky, pitrou, alexandre.vassalotti |
| 2008-07-12 07:13:28 | mark.dickinson | set | spambayes_score: 0.00181866 -> 0.00181866 messageid: <1215846808.68.0.106762891444.issue3008@psf.upfronthosting.co.za> |
| 2008-07-12 07:13:27 | mark.dickinson | link | issue3008 messages |
| 2008-07-12 07:13:27 | mark.dickinson | create | |