A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-June/036452.html below:

[Python-Dev] Re: [Python-checkins] python/dist/src/Objectslistobject.c,2.153,2.154

[Python-Dev] Re: [Python-checkins] python/dist/src/Objectslistobject.c,2.153,2.154Walter Dörwald walter@livinglogic.de
Tue, 17 Jun 2003 19:24:04 +0200
Guido van Rossum wrote:

>>It's still not the same as for str:
>> >>> "123".index("3", 0L, sys.maxint+1)
>>2
>>[61232 refs]
>>*>>> list("123").index("3", 0L, sys.maxint+1)
>>Traceback (most recent call last):
>>   File "<stdin>", line 1, in ?
>>OverflowError: long int too large to convert to int
> 
> Do you really care about such end cases?

At least str does.

Simply changing
    "ii", &i, &j
to
    "O&O&", _PyEval_SliceIndex, &i, _PyEval_SliceIndex, &j
in the PyArg_ParseTuple() call should fix it.

Bye,
    Walter Dörwald





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4