]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue 21558: Fix a typo in the contextlib docs
authorRaymond Hettinger <python@rcn.com>
Mon, 26 May 2014 01:06:04 +0000 (18:06 -0700)
committerRaymond Hettinger <python@rcn.com>
Mon, 26 May 2014 01:06:04 +0000 (18:06 -0700)
Doc/library/contextlib.rst

index 82efd0cca15126f78806a4d18c5ba756e5371e9c..9f174d787b3461d1ad2780e77076c8b70e21f322 100644 (file)
@@ -371,7 +371,7 @@ some of the context managers being optional::
     with ExitStack() as stack:
         for resource in resources:
             stack.enter_context(resource)
-        if need_special resource:
+        if need_special_resource():
             special = acquire_special_resource()
             stack.callback(release_special_resource, special)
         # Perform operations that use the acquired resources