summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2003-05-20 02:30:04 (GMT)
committerBrett Cannon <bcannon@gmail.com>2003-05-20 02:30:04 (GMT)
commit154da9b7e2c8e713788cfaa8d25d8c21edd826f9 (patch)
tree12fec067278e3af08f634ce0813e0c97d8da6dc7
parent88957d8d0d9bf6d45603171927aa82d921bf9697 (diff)
downloadcpython-154da9b7e2c8e713788cfaa8d25d8c21edd826f9.zip
cpython-154da9b7e2c8e713788cfaa8d25d8c21edd826f9.tar.gz
cpython-154da9b7e2c8e713788cfaa8d25d8c21edd826f9.tar.bz2
Fix docstrings for __(get|set|del)slice__ to mention that negative indices are not supported.
-rw-r--r--Objects/typeobject.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index b2b72c8..c9fcaa7 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -4781,11 +4781,17 @@ static slotdef slotdefs[] = {
SQSLOT("__getitem__", sq_item, slot_sq_item, wrap_sq_item,
"x.__getitem__(y) <==> x[y]"),
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,
- "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,
- "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,
wrap_intintobjargproc,
"x.__setslice__(i, j, y) <==> x[i:j]=y"),