summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-04-27 18:32:02 (GMT)
committerGreg Ward <gward@python.net>2000-04-27 18:32:02 (GMT)
commit38c28e379c42fc520daf38a94637886869b692c0 (patch)
tree92a4da904a7a4593e5334a17e6d091a528575ee9
parent6a647bb910be5bd2b3dc65f464f2e3c3e87e31b2 (diff)
downloadcpython-38c28e379c42fc520daf38a94637886869b692c0.zip
cpython-38c28e379c42fc520daf38a94637886869b692c0.tar.gz
cpython-38c28e379c42fc520daf38a94637886869b692c0.tar.bz2
Added a note to the section on 'exec' about the need for a trailing newline
in certain circumstances. (Apparently, this is a CPython problem.)
-rw-r--r--Doc/ref/ref6.tex11
1 files changed, 10 insertions, 1 deletions
diff --git a/Doc/ref/ref6.tex b/Doc/ref/ref6.tex
index 6c2b485..b62e394 100644
--- a/Doc/ref/ref6.tex
+++ b/Doc/ref/ref6.tex
@@ -227,7 +227,7 @@ target sequence, if the object allows it.
\indexii{slicing}{assignment}
\end{itemize}
-
+
(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
@@ -612,3 +612,12 @@ for use by \keyword{exec}.
\bifuncindex{eval}
\bifuncindex{globals}
\bifuncindex{locals}
+
+Also, in the current implementation, multi-line compound statements must
+end with a newline:
+\code{exec "for v in seq:\e{}n\e{}tprint v\e{}n"} works, but
+\code{exec "for v in seq:\e{}n\e{}tprint v"} fails with
+\exception{SyntaxError}.
+\exindex{SyntaxError}
+
+