summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2014-05-25 18:06:04 -0700
committerRaymond Hettinger <python@rcn.com>2014-05-25 18:06:04 -0700
commite8e2df3daad12f62fd9fd7c51187b162d77a48fe (patch)
tree6a04fff685c8da739c464db433563a27d0e6bc4e
parent978c6abced7f129a66c39135139e60b3e0fa4e0b (diff)
downloadcpython-git-e8e2df3daad12f62fd9fd7c51187b162d77a48fe.tar.gz
Issue 21558: Fix a typo in the contextlib docs
-rw-r--r--Doc/library/contextlib.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst
index 82efd0cca1..9f174d787b 100644
--- a/Doc/library/contextlib.rst
+++ b/Doc/library/contextlib.rst
@@ -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