[issue4536] SystemError if invalid arguments passed to range() and step=-1
Amaury Forgeot d'Arc
report at bugs.python.org
Fri Dec 5 14:03:09 CET 2008
Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:
It's right that the overflow handling path is never never taken:
If "step = PyNumber_Index(step)" succeeds, 'step' is (a subclass of) an
int, and PyNumber_AsSsize_t cannot fail, not even on low memory
conditions, and large figures are clipped.
But if it were to fail (in some future implementation), the present code
would clear an eventual exception.
Maybe this part could be applied only to 3.1.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list