8000 gh-96265: Fix some formatting in faq/design.rst by slateny · Pull Request #96924 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-96265: Fix some formatting in faq/design.rst #96924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 7, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Wrap long line
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
  • Loading branch information
slateny and ezio-melotti authored Sep 22, 2022
commit e110dd13f361c5e8a5d764b2fa9af74b23f97b48
3 changes: 2 additions & 1 deletion Doc/faq/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,8 @@ Why don't generators support the with statement?
For technical reasons, a generator used directly as a context manager
would not work correctly. When, as is most common, a generator is used as
an iterator run to completion, no closing is needed. When it is, wrap
it as :func:`contextlib.closing(generator) <contextlib.closing>` in the :keyword:`with` statement.
it as :func:`contextlib.closing(generator) <contextlib.closing>`
in the :keyword:`with` statement.


Why are colons required for the if/while/def/class statements?
Expand Down
0