Message170827
| Author |
serhiy.storchaka |
| Recipients |
serhiy.storchaka |
| Date |
2012年09月20日.18:51:09 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
PyArg_ParseTuple raises inconsistent overflow error messages for small integer formats. For example:
>>> import _testcapi
>>> _testcapi.getargs_b(100)
100
>>> _testcapi.getargs_b(1000)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: unsigned byte integer is greater than maximum
>>> _testcapi.getargs_b(-1000)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: unsigned byte integer is less than minimum
>>> _testcapi.getargs_b(100000000000000000000)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: Python int too large to convert to C long
>>> _testcapi.getargs_b(-100000000000000000000)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: Python int too large to convert to C long
On platforms with 32-bit int and 64-bit long there will be more such cases. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年09月20日 18:51:10 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka |
| 2012年09月20日 18:51:10 | serhiy.storchaka | set | messageid: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> |
| 2012年09月20日 18:51:09 | serhiy.storchaka | link | issue15988 messages |
| 2012年09月20日 18:51:09 | serhiy.storchaka | create |
|