Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Cython / tests / run / async_globals.pyx
Size: Mime:
# mode: run
# tag: pep492, asyncfor, await, gh2613

# Using C-globals in coroutines.


cdef object py_retval


async def test():
    """
    >>> t = test()
    >>> try: t.send(None)
    ... except StopIteration as ex:
    ...     print(ex.args[0] if ex.args else None)
    ... else: print("NOT STOPPED!")
    None
    """
    global py_retval
    py_retval = {'foo': 42}