Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
92217592
Commit
92217592
authored
Sep 09, 2016
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #28049: Add documentation for typing.Awaitable and friends.
By Michael Lee.
parent
bf04b069
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
Doc/library/typing.rst
Doc/library/typing.rst
+13
-1
No files found.
Doc/library/typing.rst
View file @
92217592
...
...
@@ -646,6 +646,18 @@ The module defines the following classes, functions and decorators:
A generic version of :class:`collections.abc.ValuesView`.
.. class:: Awaitable(Generic[T_co])
A generic version of :class:`collections.abc.Awaitable`.
.. class:: AsyncIterable(Generic[T_co])
A generic version of :class:`collections.abc.AsyncIterable`.
.. class:: AsyncIterator(AsyncIterable[T_co])
A generic version of :class:`collections.abc.AsyncIterator`.
.. class:: ContextManager(Generic[T_co])
A generic version of :class:`contextlib.AbstractContextManager`.
...
...
@@ -684,7 +696,7 @@ The module defines the following classes, functions and decorators:
start += 1
Alternatively, annotate your generator as having a return type of
``Iterator[YieldType]``::
either ``Iterable[YieldType]`` or
``Iterator[YieldType]``::
def infinite_stream(start: int) -> Iterator[int]:
while True:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment