mirror of https://github.com/python/cpython
- Fixed typo in multi-line exception example
- Fixed indentation for a verbatim block
This commit is contained in:
parent
36ee8ce373
commit
456ff91664
|
@ -443,7 +443,7 @@ last line of a traceback, but can extend across multiple lines if the
|
||||||
exception has a multi-line detail:
|
exception has a multi-line detail:
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
>>> raise ValueError('multi\n line\ndetail')
|
>>> raise ValueError('multi\n line\ndetail')
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
File "<stdin>", line 1, in ?
|
File "<stdin>", line 1, in ?
|
||||||
ValueError: multi
|
ValueError: multi
|
||||||
|
@ -460,7 +460,7 @@ significant documentation value to the example. So the last example
|
||||||
is probably better as:
|
is probably better as:
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
>>> raise ValueError('multi\n line\ndetail')
|
>>> raise ValueError('multi\n line\ndetail')
|
||||||
Traceback (most recent call last):
|
Traceback (most recent call last):
|
||||||
...
|
...
|
||||||
ValueError: multi
|
ValueError: multi
|
||||||
|
@ -1699,10 +1699,10 @@ the synthesized code under the debugger:
|
||||||
\function{script_from_examples()} above. For example, if module
|
\function{script_from_examples()} above. For example, if module
|
||||||
\file{a.py} contains a top-level function \function{f()}, then
|
\file{a.py} contains a top-level function \function{f()}, then
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
import a, doctest
|
import a, doctest
|
||||||
print doctest.testsource(a, "a.f")
|
print doctest.testsource(a, "a.f")
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
|
|
||||||
prints a script version of function \function{f()}'s docstring,
|
prints a script version of function \function{f()}'s docstring,
|
||||||
with doctests converted to code, and the rest placed in comments.
|
with doctests converted to code, and the rest placed in comments.
|
||||||
|
|
Loading…
Reference in New Issue