]> granicus.if.org Git - python/commitdiff
Patch #1479438: add \keyword markup for "with".
authorGeorg Brandl <georg@python.org>
Sun, 30 Apr 2006 19:34:19 +0000 (19:34 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 30 Apr 2006 19:34:19 +0000 (19:34 +0000)
Doc/ref/ref3.tex
Doc/ref/ref7.tex

index 7b4089d3acf8c8481dcc241527d4ba30b33e98c7..d22448c15eac1d610fc2b674868033a40c2a307c 100644 (file)
@@ -2149,9 +2149,9 @@ using a generator function decorated with the
 than writing individual \method{__enter__()} and \method{__exit__()}
 methods on a separate object when the state to be managed is complex.
 
-With statement context objects also need to implement this method; they
-are required to return themselves (that is, this method will simply
-return \var{self}).
+\keyword{with} statement context objects also need to implement this
+method; they are required to return themselves (that is, this method
+will simply return \var{self}).
 \end{methoddesc}
 
 \begin{methoddesc}[with statement context]{__enter__}{self}
index 180e22fde4b254cc4464489cdec07b4b691572e6..4453e87c84a4f6f51bf62989095f1c5fe78afb63 100644 (file)
@@ -315,7 +315,7 @@ statement to generate exceptions may be found in section~\ref{raise}.
 \versionadded{2.5}
 
 The \keyword{with} statement is used to wrap the execution of a block
-with methods defined by a context manager or with statement context
+with methods defined by a context manager or \keyword{with} statement context
 object (see section~\ref{context-managers}). This allows common
 \keyword{try}...\keyword{except}...\keyword{finally} usage patterns to
 be encapsulated for convenient reuse.
@@ -332,7 +332,7 @@ The execution of the \keyword{with} statement proceeds as follows:
 \item The context expression is evaluated, to obtain a context manager.
 
 \item The context manger's \method{__context__()} method is
-invoked to obtain a with statement context object.
+invoked to obtain a \keyword{with} statement context object.
 
 \item The context object's \method{__enter__()} method is invoked.