@@ -69,6 +69,7 @@ Functions and classes provided:
6969   The function can then be used like this::
7070
7171      >>> with managed_resource(timeout=3600) as resource: 
72+       ...     ... 
7273      ...     # Resource is released at the end of this block, 
7374      ...     # even if code in the block raises an exception 
7475
@@ -145,6 +146,7 @@ Functions and classes provided:
145146     @timeit() 
146147     async def main(): 
147148         # ... async code ... 
149+          ... 
148150
149151   When used as a decorator, a new generator instance is implicitly created on
150152   each function call. This allows the otherwise "one-shot" context managers
@@ -241,6 +243,7 @@ Functions and classes provided:
241243              cm = contextlib.nullcontext() 
242244          with cm: 
243245              # Do something 
246+               ... 
244247
245248   An example using *enter_result *::
246249
@@ -254,6 +257,7 @@ Functions and classes provided:
254257
255258          with cm as file: 
256259              # Perform processing on the file 
260+               ... 
257261
258262   It can also be used as a stand-in for
259263   :ref: `asynchronous context managers  <async-context-managers >`::
@@ -268,6 +272,7 @@ Functions and classes provided:
268272
269273           async with cm as session: 
270274               # Send http requests with session 
275+                ... 
271276
272277   .. versionadded :: 3.7 
273278
@@ -438,12 +443,14 @@ Functions and classes provided:
438443      def f(): 
439444          with cm(): 
440445              # Do stuff 
446+               ... 
441447
442448   ``ContextDecorator `` lets you instead write::
443449
444450      @cm() 
445451      def f(): 
446452          # Do stuff 
453+           ... 
447454
448455   It makes it clear that the ``cm `` applies to the whole function, rather than
449456   just a piece of it (and saving an indentation level is nice, too).
@@ -706,9 +713,11 @@ protocol can be separated slightly in order to allow this::
706713       x = stack.enter_context(cm) 
707714   except Exception: 
708715       # handle __enter__ exception 
716+        ... 
709717   else: 
710718       with stack: 
711719           # Handle normal case 
720+            ... 
712721
713722Actually needing to do this is likely to indicate that the underlying API
714723should be providing a direct resource management interface for use with
0 commit comments