Commit 1e53b640 authored by Brett Cannon's avatar Brett Cannon

Fix docstrings for __(get|set|del)slice__ to mention that negative indices are not supported.

parent 8716b289
...@@ -4781,11 +4781,17 @@ static slotdef slotdefs[] = { ...@@ -4781,11 +4781,17 @@ static slotdef slotdefs[] = {
SQSLOT("__getitem__", sq_item, slot_sq_item, wrap_sq_item, SQSLOT("__getitem__", sq_item, slot_sq_item, wrap_sq_item,
"x.__getitem__(y) <==> x[y]"), "x.__getitem__(y) <==> x[y]"),
SQSLOT("__getslice__", sq_slice, slot_sq_slice, wrap_intintargfunc, SQSLOT("__getslice__", sq_slice, slot_sq_slice, wrap_intintargfunc,
"x.__getslice__(i, j) <==> x[i:j]"), "x.__getslice__(i, j) <==> x[i:j]\n\
\n\
Use of negative indices is not supported."),
SQSLOT("__setitem__", sq_ass_item, slot_sq_ass_item, wrap_sq_setitem, SQSLOT("__setitem__", sq_ass_item, slot_sq_ass_item, wrap_sq_setitem,
"x.__setitem__(i, y) <==> x[i]=y"), "x.__setitem__(i, y) <==> x[i]=y\n\
\n\
Use of negative indices is not supported."),
SQSLOT("__delitem__", sq_ass_item, slot_sq_ass_item, wrap_sq_delitem, SQSLOT("__delitem__", sq_ass_item, slot_sq_ass_item, wrap_sq_delitem,
"x.__delitem__(y) <==> del x[y]"), "x.__delitem__(y) <==> del x[y]i\n\
\n\
Use of negative indices is not supported."),
SQSLOT("__setslice__", sq_ass_slice, slot_sq_ass_slice, SQSLOT("__setslice__", sq_ass_slice, slot_sq_ass_slice,
wrap_intintobjargproc, wrap_intintobjargproc,
"x.__setslice__(i, j, y) <==> x[i:j]=y"), "x.__setslice__(i, j, y) <==> x[i:j]=y"),
......
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