This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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.
History
Date User Action Args
2008-04-25 21:59:41belopolskysetspambayes_score: 0.00598647 -> 0.005986471
recipients: + belopolsky, gvanrossum, georg.brandl, rhettinger, amaury.forgeotdarc, pitrou, benjamin.peterson
2008-04-25 21:59:38belopolskylinkissue2603 messages
2008-04-25 21:59:31belopolskycreate