Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e8e2df3

Browse files
committed
Issue 21558: Fix a typo in the contextlib docs
1 parent 978c6ab commit e8e2df3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/library/contextlib.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ some of the context managers being optional::
371371
with ExitStack() as stack:
372372
for resource in resources:
373373
stack.enter_context(resource)
374-
if need_special resource:
374+
if need_special_resource():
375375
special = acquire_special_resource()
376376
stack.callback(release_special_resource, special)
377377
# Perform operations that use the acquired resources

0 commit comments

Comments
 (0)