Message165862
| Author |
Michael.Smith |
| Recipients |
Michael.Smith |
| Date |
2012年07月19日.19:21:42 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1342725703.62.0.185151812614.issue15400@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The trailing 'L' in representations of long integers causes the int function to raise a ValueError. This is unexpected because it's reasonable to expect that `int` should be able to parse a number from any string when that string represented as a bare word would be a valid python number. The following all raise ValueError:
int(hex(12345L), 16)
int(oct(12345L), 8)
but not
int('12345', 10)
int(hex(12345), 16)
int(oct(12345), 8)
(and not bin() because of http://bugs.python.org/issue3186) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年07月19日 19:21:43 | Michael.Smith | set | recipients:
+ Michael.Smith |
| 2012年07月19日 19:21:43 | Michael.Smith | set | messageid: <1342725703.62.0.185151812614.issue15400@psf.upfronthosting.co.za> |
| 2012年07月19日 19:21:43 | Michael.Smith | link | issue15400 messages |
| 2012年07月19日 19:21:42 | Michael.Smith | create |
|