|
1 | 1 | # -*- coding: utf-8 -*-
|
2 |
| -# Autogenerated by Sphinx on Tue Dec 6 18:51:51 2016 |
| 2 | +# Autogenerated by Sphinx on Fri Dec 16 16:33:16 2016 |
3 | 3 | topics = {'assert': '\n'
|
4 | 4 | 'The "assert" statement\n'
|
5 | 5 | '**********************\n'
|
|
2613 | 2613 | 'functions, even if they do not contain "await" or "async" '
|
2614 | 2614 | 'keywords.\n'
|
2615 | 2615 | '\n'
|
2616 |
| - 'It is a "SyntaxError" to use "yield" expressions in "async def"\n' |
| 2616 | + 'It is a "SyntaxError" to use "yield from" expressions in "async ' |
| 2617 | + 'def"\n' |
2617 | 2618 | 'coroutines.\n'
|
2618 | 2619 | '\n'
|
2619 | 2620 | 'An example of a coroutine function:\n'
|
|
7087 | 7088 | 'generator is done and will cause "StopIteration" to be raised. '
|
7088 | 7089 | 'The\n'
|
7089 | 7090 | 'returned value (if any) is used as an argument to construct\n'
|
7090 |
| - '"StopIteration" and becomes the "StopIteration.value" attribute.\n', |
| 7091 | + '"StopIteration" and becomes the "StopIteration.value" attribute.\n' |
| 7092 | + '\n' |
| 7093 | + 'In an asynchronous generator function, an empty "return" ' |
| 7094 | + 'statement\n' |
| 7095 | + 'indicates that the asynchronous generator is done and will cause\n' |
| 7096 | + '"StopAsyncIteration" to be raised. A non-empty "return" statement ' |
| 7097 | + 'is\n' |
| 7098 | + 'a syntax error in an asynchronous generator function.\n', |
7091 | 7099 | 'sequence-types': '\n'
|
7092 | 7100 | 'Emulating container types\n'
|
7093 | 7101 | '*************************\n'
|
|
11097 | 11105 | 'statements.\n'
|
11098 | 11106 | ' See also the Coroutine Objects section.\n'
|
11099 | 11107 | '\n'
|
| 11108 | + ' Asynchronous generator functions\n' |
| 11109 | + ' A function or method which is defined using "async def" and\n' |
| 11110 | + ' which uses the "yield" statement is called a *asynchronous\n' |
| 11111 | + ' generator function*. Such a function, when called, returns ' |
| 11112 | + 'an\n' |
| 11113 | + ' asynchronous iterator object which can be used in an "async ' |
| 11114 | + 'for"\n' |
| 11115 | + ' statement to execute the body of the function.\n' |
| 11116 | + '\n' |
| 11117 | + ' Calling the asynchronous iterator\'s "aiterator.__anext__()"\n' |
| 11118 | + ' method will return an *awaitable* which when awaited will\n' |
| 11119 | + ' execute until it provides a value using the "yield" ' |
| 11120 | + 'expression.\n' |
| 11121 | + ' When the function executes an empty "return" statement or ' |
| 11122 | + 'falls\n' |
| 11123 | + ' off the end, a "StopAsyncIteration" exception is raised and ' |
| 11124 | + 'the\n' |
| 11125 | + ' asynchronous iterator will have reached the end of the set ' |
| 11126 | + 'of\n' |
| 11127 | + ' values to be yielded.\n' |
| 11128 | + '\n' |
11100 | 11129 | ' Built-in functions\n'
|
11101 | 11130 | ' A built-in function object is a wrapper around a C function.\n'
|
11102 | 11131 | ' Examples of built-in functions are "len()" and "math.sin()"\n'
|
|
0 commit comments