Message65817
| Author |
belopolsky |
| Recipients |
amaury.forgeotdarc, belopolsky, benjamin.peterson, georg.brandl, gvanrossum, pitrou, rhettinger |
| Date |
2008年04月25日.21:59:28 |
| SpamBayes Score |
0.005986471 |
| Marked as misclassified |
No |
| Message-id |
<d38f5330804251459j18c0241o10068e353026725f@mail.gmail.com> |
| In-reply-to |
<1209159064.22.0.923091710263.issue2603@psf.upfronthosting.co.za> |
| Content |
On Fri, Apr 25, 2008 at 5:31 PM, Benjamin Peterson
<report@bugs.python.org> wrote:
> Comments?
In the range_hash function, len, start, step locals should be declared
Py_ssize_t, not long. Also, you can use range_length() instead of
PyObject_Size() and you need to clear error if you get len == -1.
See issue2690. With your patch,
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: Python int too large to convert to C ssize_t
but
True
You can avoid this problem by using range_length_obj instead of
PyObject_Size in range_richcompare. |
|