Added a note to the section on 'exec' about the need for a trailing newline
in certain circumstances. (Apparently, this is a CPython problem.)
This commit is contained in:
parent
6a647bb910
commit
38c28e379c
|
@ -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}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue