summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1999-02-22 14:32:18 (GMT)
committerFred Drake <fdrake@acm.org>1999-02-22 14:32:18 (GMT)
commitc411fa6861ee27c4c4d6dee943588ad8a41ecad8 (patch)
tree7e2e4a8f5dc8c77ec67c2c3052c5cac79b58dc81 /Doc
parentfab41f1788a146fa175cc725ebab86569e112d93 (diff)
downloadcpython-c411fa6861ee27c4c4d6dee943588ad8a41ecad8.zip
cpython-c411fa6861ee27c4c4d6dee943588ad8a41ecad8.tar.gz
cpython-c411fa6861ee27c4c4d6dee943588ad8a41ecad8.tar.bz2
Revised description of blank line handling for the interpreter, based
on a comment from /F.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/ref/ref2.tex18
1 files changed, 11 insertions, 7 deletions
diff --git a/Doc/ref/ref2.tex b/Doc/ref/ref2.tex
index c96031a..246bc32 100644
--- a/Doc/ref/ref2.tex
+++ b/Doc/ref/ref2.tex
@@ -89,6 +89,7 @@ for string literals (i.e., tokens other than string literals cannot be
split across physical lines using a backslash). A backslash is
illegal elsewhere on a line outside a string literal.
+
\subsection{Implicit line joining\label{implicit-joining}}
Expressions in parentheses, square brackets or curly braces can be
@@ -108,14 +109,17 @@ allowed. There is no NEWLINE token between implicit continuation
lines. Implicitly continued lines can also occur within triple-quoted
strings (see below); in that case they cannot carry comments.
-\subsection{Blank lines\label{blank-lines}}
-A logical line that contains only spaces, tabs, formfeeds and possibly a
-comment, is ignored (i.e., no NEWLINE token is generated), except that
-during interactive input of statements, an entirely blank logical line
-(i.e. one containing not even whitespace or a comment)
-terminates a multi-line statement.
-\index{blank line}
+\subsection{Blank lines \index{blank line}\label{blank-lines}}
+
+A logical line that contains only spaces, tabs, formfeeds and possibly
+a comment, is ignored (i.e., no NEWLINE token is generated). During
+interactive input of statements, handling of a blank line may differ
+depending on the implementation of the read-eval-print loop. In the
+standard implementation, an entirely blank logical line (i.e.\ one
+containing not even whitespace or a comment) terminates a multi-line
+statement.
+
\subsection{Indentation\label{indentation}}