Skip to content
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

PEP 492: Resolve unreferenced footnotes #3241

Merged
merged 2 commits into from
Aug 2, 2023
Merged
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
25 changes: 7 additions & 18 deletions pep-0492.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
PEP: 492
Title: Coroutines with async and await syntax
Version: $Revision$
Last-Modified: $Date$
Author: Yury Selivanov <[email protected]>
Discussions-To: [email protected]
Status: Final
Expand Down Expand Up @@ -558,7 +556,7 @@ an asynchronous one. While this is not a very useful thing to do, the
code illustrates the relationship between regular and asynchronous
iterators.

::
.. code:: python

class AsyncIteratorWrapper:
def __init__(self, obj):
Expand All @@ -584,15 +582,15 @@ Why StopAsyncIteration?
Coroutines are still based on generators internally. So, before PEP
479, there was no fundamental difference between

::
.. code:: python

def g1():
yield from fut
return 'spam'

and

::
.. code:: python

def g2():
yield from fut
Expand All @@ -602,7 +600,7 @@ And since :pep:`479` is accepted and enabled by default for coroutines,
the following example will have its ``StopIteration`` wrapped into a
``RuntimeError``

::
.. code:: python

async def a1():
await fut
Expand Down Expand Up @@ -643,7 +641,7 @@ generators are treated as distinct concepts:
doing so will result in a ``TypeError``.

3. *generator-based coroutines* (for asyncio code must be decorated
with ``@asyncio.coroutine``) can ``yield from`` *native coroutine
with ``@asyncio.coroutine`` [1]_) can ``yield from`` *native coroutine
objects*.

4. ``inspect.isgenerator()`` and ``inspect.isgeneratorfunction()``
Expand Down Expand Up @@ -1218,7 +1216,7 @@ Overall Impact
This proposal introduces no observable performance impact. Here is an
output of python's official set of benchmarks [4]_:

::
.. code:: text

python perf.py -r -b default ../cpython/python.exe ../cpython-aw/python.exe

Expand Down Expand Up @@ -1356,7 +1354,7 @@ Working example
All concepts proposed in this PEP are implemented [3]_ and can be
tested.

::
.. code:: python

import asyncio

Expand Down Expand Up @@ -1456,12 +1454,3 @@ Copyright
=========

This document has been placed in the public domain.

..
Local Variables:
mode: indented-text
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
coding: utf-8
End: