gh-71141: Add note on rejecting "leading-dot" syntax for with statements (#96928)

Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
This commit is contained in:
Stanley 2022-09-20 21:16:39 -07:00 committed by GitHub
parent 57463d43dc
commit e5ab0b6aa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -703,6 +703,10 @@ This also has the side-effect of increasing execution speed because name
bindings are resolved at run-time in Python, and the second version only needs
to perform the resolution once.
Similar proposals that would introduce syntax to further reduce code volume,
such as using a 'leading dot', have been rejected in favour of explicitness (see
https://mail.python.org/pipermail/python-ideas/2016-May/040070.html).
Why don't generators support the with statement?
------------------------------------------------