Re: [Python-Dev] iscoroutinefunction vs. coroutines

2017-03-09 Thread Guido van Rossum
On Thu, Mar 9, 2017 at 3:04 AM, Matthias Urlichs wrote: > Is this pattern > > def foo(): > return bar() > async def bar(): > await > > async def async_main(): > await foo() > > considered to be valid? > Yes, it is valid.

[Python-Dev] iscoroutinefunction vs. coroutines

2017-03-09 Thread Matthias Urlichs
Hi, Is this pattern def foo(): return bar() async def bar(): await async def async_main(): await foo() considered to be valid? The reason I'm asking is that some code out there likes to accept a might-be-a-coroutine-funct