Make sure that we raise a TypeError for invalid numbers of arguments for range().
Cython incorrectly generated (optimised) range code for "for i in range(1,2,3,4)" as if it saw "for i in range(1,2,3)". This PR deactivates this optimization when too many arguments are provided, to match the behavior of Python. Original patch by Max Bachmann. Closes https://github.com/cython/cython/pull/4550
Showing
Please register or sign in to comment