r45826 - python/trunk/Doc/ref/ref3.tex python/trunk/Doc/ref/ref7.tex
Author: georg.brandl Date: Sun Apr 30 21:34:19 2006 New Revision: 45826 Modified: python/trunk/Doc/ref/ref3.tex python/trunk/Doc/ref/ref7.tex Log: Patch #1479438: add \keyword markup for "with". Modified: python/trunk/Doc/ref/ref3.tex ============================================================================== --- python/trunk/Doc/ref/ref3.tex (original) +++ python/trunk/Doc/ref/ref3.tex Sun Apr 30 21:34:19 2006 @@ -2149,9 +2149,9 @@ 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} Modified: python/trunk/Doc/ref/ref7.tex ============================================================================== --- python/trunk/Doc/ref/ref7.tex (original) +++ python/trunk/Doc/ref/ref7.tex Sun Apr 30 21:34:19 2006 @@ -315,7 +315,7 @@ \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 @@ \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.
participants (1)
-
georg.brandl