summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-07-07 23:03:07 (GMT)
committerGuido van Rossum <guido@python.org>1995-07-07 23:03:07 (GMT)
commit95a5b9c94999a08f98d288902eca71501fe449bf (patch)
tree37fc0640f887c3f0575d69e7d4c85d76ca8c057b /Doc
parentd6ac380d394771a8c72e42a8c1443b2151718d62 (diff)
downloadcpython-95a5b9c94999a08f98d288902eca71501fe449bf.zip
cpython-95a5b9c94999a08f98d288902eca71501fe449bf.tar.gz
cpython-95a5b9c94999a08f98d288902eca71501fe449bf.tar.bz2
correct description of list.insert()
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libtypes.tex3
-rw-r--r--Doc/libtypes.tex3
2 files changed, 4 insertions, 2 deletions
diff --git a/Doc/lib/libtypes.tex b/Doc/lib/libtypes.tex
index 248ad6e..a3bc0b2 100644
--- a/Doc/lib/libtypes.tex
+++ b/Doc/lib/libtypes.tex
@@ -434,7 +434,8 @@ The following operations are defined on mutable sequence types (where
\lineiii{\var{s}.index(\var{x})}
{return smallest \var{i} such that \code{\var{s}[\var{i}] == \var{x}}}{(1)}
\lineiii{\var{s}.insert(\var{i}, \var{x})}
- {same as \code{\var{s}[\var{i}:\var{i}] = [\var{x}]}}{}
+ {same as \code{\var{s}[\var{i}:\var{i}] = [\var{x}]}
+ if \code{\var{i} >= 0}}{}
\lineiii{\var{s}.remove(\var{x})}
{same as \code{del \var{s}[\var{s}.index(\var{x})]}}{(1)}
\lineiii{\var{s}.reverse()}
diff --git a/Doc/libtypes.tex b/Doc/libtypes.tex
index 248ad6e..a3bc0b2 100644
--- a/Doc/libtypes.tex
+++ b/Doc/libtypes.tex
@@ -434,7 +434,8 @@ The following operations are defined on mutable sequence types (where
\lineiii{\var{s}.index(\var{x})}
{return smallest \var{i} such that \code{\var{s}[\var{i}] == \var{x}}}{(1)}
\lineiii{\var{s}.insert(\var{i}, \var{x})}
- {same as \code{\var{s}[\var{i}:\var{i}] = [\var{x}]}}{}
+ {same as \code{\var{s}[\var{i}:\var{i}] = [\var{x}]}
+ if \code{\var{i} >= 0}}{}
\lineiii{\var{s}.remove(\var{x})}
{same as \code{del \var{s}[\var{s}.index(\var{x})]}}{(1)}
\lineiii{\var{s}.reverse()}