1# mode: run
2# tag: pep492, asyncfor, await, gh2613
3
4# Using C-globals in coroutines.
5
6
7cdef object py_retval
8
9
10async def test():
11    """
12    >>> t = test()
13    >>> try: t.send(None)
14    ... except StopIteration as ex:
15    ...     print(ex.args[0] if ex.args else None)
16    ... else: print("NOT STOPPED!")
17    None
18    """
19    global py_retval
20    py_retval = {'foo': 42}
21