Message178548
| Author |
mrabarnett |
| Recipients |
gangesmaster, mark.dickinson, mrabarnett |
| Date |
2012年12月30日.02:52:17 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1356835939.81.0.381329802374.issue16741@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I've attached a patch.
It now reports an invalid literal as-is:
>>> int("#\N{ARABIC-INDIC DIGIT ONE}")
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
int("#\N{ARABIC-INDIC DIGIT ONE}")
ValueError: invalid literal for int() with base 10: '#١'
>>> int("foo\x00bar")
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
int("foo\x00bar")
ValueError: invalid literal for int() with base 10: 'foo\x00bar'
There's a slight difference in that it truncates to 200 codepoints, not 200 UTF-8 bytes. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年12月30日 02:52:19 | mrabarnett | set | recipients:
+ mrabarnett, mark.dickinson, gangesmaster |
| 2012年12月30日 02:52:19 | mrabarnett | set | messageid: <1356835939.81.0.381329802374.issue16741@psf.upfronthosting.co.za> |
| 2012年12月30日 02:52:19 | mrabarnett | link | issue16741 messages |
| 2012年12月30日 02:52:19 | mrabarnett | create |
|