Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1d3e6c1

Browse files
committed
Fix whitespace in example of bad indentation: a comment indicated that one
line was not indented at all, so the example is no longer indented at all. All of the errors being shown remain. Typo: characteru --> character
1 parent 9493455 commit 1d3e6c1

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

Doc/ref/ref2.tex

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,13 @@ \subsection{Indentation\label{indentation}}
195195
The following example shows various indentation errors:
196196

197197
\begin{verbatim}
198-
def perm(l): # error: first line indented
199-
for i in range(len(l)): # error: not indented
200-
s = l[:i] + l[i+1:]
201-
p = perm(l[:i] + l[i+1:]) # error: unexpected indent
202-
for x in p:
203-
r.append(l[i:i+1] + x)
204-
return r # error: inconsistent dedent
198+
def perm(l): # error: first line indented
199+
for i in range(len(l)): # error: not indented
200+
s = l[:i] + l[i+1:]
201+
p = perm(l[:i] + l[i+1:]) # error: unexpected indent
202+
for x in p:
203+
r.append(l[i:i+1] + x)
204+
return r # error: inconsistent dedent
205205
\end{verbatim}
206206

207207
(Actually, the first three errors are detected by the parser; only the
@@ -327,7 +327,7 @@ \subsection{String literals\label{strings}}
327327
\production{shortstringchar}
328328
{<any ASCII character except "\e" or newline or the quote>}
329329
\production{longstringchar}
330-
{<any ASCII characteru except "\e">}
330+
{<any ASCII character except "\e">}
331331
\production{escapeseq}
332332
{"\e" <any ASCII character>}
333333
\end{productionlist}

0 commit comments

Comments
 (0)