Skip to content

Conversation

o11c
Copy link
Owner

@o11c o11c commented Oct 13, 2015

…xample

that @nierob reported in python#836)

Now don't crash in:

```
import asyncio

@asyncio.coroutine
def example_coro():
    q = asyncio.Queue()
    msg = yield from q.get()

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(example_coro())
```

But that example is because don't infer asyncio.Queue type properly as
is appointed in python#836, so q is AnyType

and

```
import asyncio
import typing

@asyncio.coroutine
def foo(a):
   b = yield from a
   return b
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants