summaryrefslogtreecommitdiffstats
path: root/Doc/ref6.tex
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-08-23 13:26:22 (GMT)
committerGuido van Rossum <guido@python.org>1994-08-23 13:26:22 (GMT)
commitbd851cd167008e9f374c717b52bf0ba4be3f26c6 (patch)
treea46f946b63d7f893b38b76ab265b620eb2c94b17 /Doc/ref6.tex
parentd849a4838ddbecbe8264110e5aa0a33739df1131 (diff)
downloadcpython-bd851cd167008e9f374c717b52bf0ba4be3f26c6.zip
cpython-bd851cd167008e9f374c717b52bf0ba4be3f26c6.tar.gz
cpython-bd851cd167008e9f374c717b52bf0ba4be3f26c6.tar.bz2
* Doc/libtime.tex: get rid of references to millitime() and
millisleep(); document clock() * Doc/ref6.tex (section{Assignment statements}): added warning about overlaps in lhs of assignment (e.g. "i, x[i] = 1, 2")
Diffstat (limited to 'Doc/ref6.tex')
-rw-r--r--Doc/ref6.tex16
1 files changed, 15 insertions, 1 deletions
diff --git a/Doc/ref6.tex b/Doc/ref6.tex
index b1d4572..53e6c40 100644
--- a/Doc/ref6.tex
+++ b/Doc/ref6.tex
@@ -190,11 +190,25 @@ target sequence, if the object allows it.
\end{itemize}
-(In the original implementation, the syntax for targets is taken
+(In the current implementation, the syntax for targets is taken
to be the same as for expressions, and invalid syntax is rejected
during the code generation phase, causing less detailed error
messages.)
+WARNING: Although the definition of assignment implies that overlaps
+between the left-hand side and the right-hand side are `safe' (e.g.
+\verb@a, b = b, a@ swaps two variables), overlaps within the
+collection of assigned-to variables are not safe! For instance, the
+following program prints \code@[0, 2]@:
+
+\begin{verbatim}
+x = [0, 1]
+i = 0
+i, x[i] = 1, 2
+print x
+\end{verbatim}
+
+
\section{The {\tt pass} statement}
\stindex{pass}