[issue27867] various issues due to misuse of PySlice_GetIndicesEx

Serhiy Storchaka report at bugs.python.org
Tue Aug 30 13:47:55 EDT 2016


Serhiy Storchaka added the comment:

Actually making slicing always working is easier than I expected. Maybe it is even easier than raise an error.

PySlice_GetIndicesEx() is split on two functions. First convert slice attributes to Py_ssize_t, then scale them to appropriate range depending on the length. Here is a sample patch.

----------
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file44279/slice_get_indices.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27867>
_______________________________________


More information about the Python-bugs-list mailing list