You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2017-06-20.04:34:20.751>labels= ['type-bug', '3.7', 'docs']
title='Incorrect description of "async with" in PEP492 and documentation'updated_at=<Date2017-06-20.05:38:31.725>user='https://bugs.python.org/DamienGeorge'
The behaviour of the "async with" statement in CPython does not match the description of it in PEP-492, nor the language documentation. The implementation uses a try/except/finally block, while the PEP and documentation describe the behaviour using a try/except/else block. The PEP and documentation should be updated to reflect the true intention of "async with".
The specific issue is that early exits from an "async with" statement are actually defined the same way they for synchronous with statements: exiting early via return, break, or continue, is the same as reaching the end of the try block.
However, that's not what the documentation currently says: it describes "async with" in terms of try/except/else, which isn't correct.
This looks resolved to me - language reference's been updated with finally, and regarding the pep I opened an issue here on the pep repo for discussion there.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: