8000 bpo-33514: Document PEP 492 changes in 3.7 changelog by hroncok · Pull Request #6857 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-33514: Document PEP 492 changes in 3.7 changelog #6857

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions Doc/reference/compound_stmts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,8 @@ can be used to create instance variables with different implementation details.
:pep:`3129` - Class Decorators


.. _async:

Coroutines
==========

Expand Down
10 changes: 10 additions & 0 deletions Doc/whatsnew/3.7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,16 @@ Changes in Python behavior
exceptions.
(Contributed by Yury Selivanov in :issue:`32670`.)

* :pep:`492` is fully implemented in Python 3.7, meaning that the old
:meth:`__aiter__` protocol is no longer supported: a
:exc:`RuntimeError` will be raised if :meth:`__aiter__` returns anything
but an asynchronous iterator.

Since Python 3.7, :keyword:`async` and :keyword:`await` names are proper
keywords. If you use them for variable names, you need to rename them in
order to make the code work on Python 3.7. Trying to use a keyword as
a variable name will raise a :exc:`SyntaxError`.

* Due to an oversight, earlier Python versions erroneously accepted the
following syntax::

Expand Down
0