mirror of
https://github.com/python/cpython.git
synced 2024-11-27 11:55:13 +08:00
Issue 21558: Fix a typo in the contextlib docs
This commit is contained in:
parent
978c6abced
commit
e8e2df3daa
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user