summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-05-21 15:50:30 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-05-21 15:50:30 (GMT)
commitf3e40fac10fa240b98a709191c6648fdd585b55f (patch)
treee5f27a9f6b15c73d46e42dec738a2a8fb44f39d8 /Doc/whatsnew
parent548de2b210d60e4619c69269685ca66a59b29b6b (diff)
downloadcpython-f3e40fac10fa240b98a709191c6648fdd585b55f.zip
cpython-f3e40fac10fa240b98a709191c6648fdd585b55f.tar.gz
cpython-f3e40fac10fa240b98a709191c6648fdd585b55f.tar.bz2
Issue 24180: Documentation for PEP 492 changes.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.5.rst33
1 files changed, 32 insertions, 1 deletions
diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst
index 3a7b5d6..b9ea627 100644
--- a/Doc/whatsnew/3.5.rst
+++ b/Doc/whatsnew/3.5.rst
@@ -121,6 +121,26 @@ Please read on for a comprehensive list of user-facing changes.
PEP written by Carl Meyer
+PEP 492 - Coroutines with async and await syntax
+------------------------------------------------
+
+The PEP added dedicated syntax for declaring :term:`coroutines <coroutine>`,
+:keyword:`await` expressions, new asynchronous :keyword:`async for`
+and :keyword:`async with` statements.
+
+Example::
+
+ async def read_data(db):
+ async with db.transaction():
+ data = await db.fetch('SELECT ...')
+
+PEP written and implemented by Yury Selivanov.
+
+.. seealso::
+
+ :pep:`492` -- Coroutines with async and await syntax
+
+
PEP 461 - Adding formatting to bytes and bytearray
--------------------------------------------------
@@ -433,6 +453,10 @@ inspect
* New argument ``follow_wrapped`` for :func:`inspect.signature`.
(Contributed by Yury Selivanov in :issue:`20691`.)
+* New :func:`~inspect.iscoroutine`, :func:`~inspect.iscoroutinefunction`,
+ and :func:`~inspect.isawaitable` functions. (Contributed by Yury Selivanov
+ in :issue:`24017`.)
+
ipaddress
---------
@@ -614,6 +638,12 @@ time
* The :func:`time.monotonic` function is now always available. (Contributed by
Victor Stinner in :issue:`22043`.)
+types
+-----
+
+* New :func:`~types.coroutine` function. (Contributed by Yury Selivanov
+ in :issue:`24017`.)
+
urllib
------
@@ -961,4 +991,5 @@ Changes in the C API
(:issue:`20204`)
* As part of PEP 492 implementation, ``tp_reserved`` slot of
- ``PyTypeObject`` was replaced with ``tp_as_async`` slot.
+ :c:type:`PyTypeObject` was replaced with a
+ :c:member:`PyTypeObject.tp_as_async` slot.