Message218859
| Author |
Kurt.Rose |
| Recipients |
Kurt.Rose |
| Date |
2014年05月20日.23:38:23 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1400629106.74.0.994862767087.issue21546@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
int() ignores everything after a null byte when reporting an error message.
Here you can see an example of how this manifests, and why could be a problem.
Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> int('a')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: 'a'
>>> int('0円a')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: ''
>>> int('abc0円def')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: 'abc' |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年05月20日 23:38:26 | Kurt.Rose | set | recipients:
+ Kurt.Rose |
| 2014年05月20日 23:38:26 | Kurt.Rose | set | messageid: <1400629106.74.0.994862767087.issue21546@psf.upfronthosting.co.za> |
| 2014年05月20日 23:38:26 | Kurt.Rose | link | issue21546 messages |
| 2014年05月20日 23:38:24 | Kurt.Rose | create |
|