Skip to content

Commit 315f2ce

Browse files
authored
PEP 492: Resolve unreferenced footnotes (#3241)
1 parent 8be3570 commit 315f2ce

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

pep-0492.txt

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
PEP: 492
22
Title: Coroutines with async and await syntax
3-
Version: $Revision$
4-
Last-Modified: $Date$
53
Author: Yury Selivanov <yury@edgedb.com>
64
Discussions-To: python-dev@python.org
75
Status: Final
@@ -558,7 +556,7 @@ an asynchronous one. While this is not a very useful thing to do, the
558556
code illustrates the relationship between regular and asynchronous
559557
iterators.
560558

561-
::
559+
.. code:: python
562560

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

587-
::
585+
.. code:: python
588586

589587
def g1():
590588
yield from fut
591589
return 'spam'
592590

593591
and
594592

595-
::
593+
.. code:: python
596594

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

605-
::
603+
.. code:: python
606604

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

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

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

1221-
::
1219+
.. code:: text
12221220

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

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

1359-
::
1357+
.. code:: python
13601358

13611359
import asyncio
13621360

@@ -1456,12 +1454,3 @@ Copyright
14561454
=========
14571455

14581456
This document has been placed in the public domain.
1459-
1460-
..
1461-
Local Variables:
1462-
mode: indented-text
1463-
indent-tabs-mode: nil
1464-
sentence-end-double-space: t
1465-
fill-column: 70
1466-
coding: utf-8
1467-
End:

0 commit comments

Comments
 (0)