STINNER Victor added the comment: > The change announces "... clip the step to [-PY_SSIZE_T_MAX, PY_SSIZE_T_MAX] > ...", but there is no explicit to clip the maximum to PY_SSIZE_T_MAX. Maybe > there is a bug on this side too! The code should be reviewed one more time.
Ok, I checked: _PySlice_Unpack() uses _PyEval_SliceIndex() to convert the step Python object into a C Py_ssize_t, so the code is already correct: it does "clip the step to [-PY_SSIZE_T_MAX, PY_SSIZE_T_MAX]" as announced ;-) I close the issue. Thanks Serhiy for your work on fixing corner cases related to slices ;-) ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30255> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com