[Python-ideas] Should iscoroutine and iscoroutinefunction be in builtins?

Steven D'Aprano steve at pearwood.info
Sun Jul 2 23:28:39 EDT 2017


On Sun, Jul 02, 2017 at 11:18:04PM -0400, Alex Walters wrote:

> Before async/await it made sense that iscoroutine and iscoroutinefunction
> live in asyncio.  But now that coroutines are a built in type, supported by
> its own syntax, wouldn't it make sense to make those functions builtins?

Generators and generator functions are built-in, supported by their own 
syntax, but 'isgenerator' and 'isgeneratorfunction' still live in the 
inspect module.

So I think the answer to your question is no.


-- 
Steve


More information about the Python-ideas mailing list