[issue24400] Awaitable ABC incompatible with functools.singledispatch

Yury Selivanov report at bugs.python.org
Tue Jun 30 23:54:29 CEST 2015


Yury Selivanov added the comment:

> > isawaitable(), however, should continue using abc.Awaitable, since it only checks for __await__ presence on the type (or should we just drop it?)

> I'd really remove it. It's not referring to an actual type, so it doesn't fit the purpose of the inspect module. The fact that the only place where "collections.abc" is used in this module is in isawaitable() should be a clear indication that it's misplaced.

+1.

I added 'isawaitable()' before we decided to add ABCs, and now it is redundant (and we don't have isiterable, ishashable etc)

Ben, I saw that you're using isawaitable() in tornado, but it looks like you can easily switch the code to use Awaitable ABC, right?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24400>
_______________________________________


More information about the Python-bugs-list mailing list