Read about our upcoming Code of Conduct on this issue

Commit af795249 authored by Armin Rigo's avatar Armin Rigo
Browse files

This should help avoid the indices3() and indices4() methods to appear on W_Root

parent 3d6ba54d426e
......@@ -75,7 +75,7 @@ def PySlice_GetIndicesEx(space, w_slice, length, start_p, stop_p, step_p,
Returns 0 on success and -1 on error with exception set."""
if not isinstance(w_slice, W_SliceObject):
PyErr_BadInternalCall(space)
raise PyErr_BadInternalCall(space)
start_p[0], stop_p[0], step_p[0], slicelength_p[0] = \
w_slice.indices4(space, length)
return 0
......@@ -96,7 +96,7 @@ def PySlice_GetIndices(space, w_slice, length, start_p, stop_p, step_p):
incorporate the source of PySlice_GetIndicesEx(), suitably renamed,
in the source of your extension."""
if not isinstance(w_slice, W_SliceObject):
PyErr_BadInternalCall(space)
raise PyErr_BadInternalCall(space)
start_p[0], stop_p[0], step_p[0] = \
w_slice.indices3(space, length)
return 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment