New submission from Andrew Svetlov <andrew.svet...@gmail.com>:

isfunction() processes both `isfunction(func)` and `isfunction(partial(func, 
arg))` correctly.

But `iscoroutinefunction()` misses this functionality.

We can implement it easy by adding a check for `isinstance(func, partial)` and 
applying a coroutine check for `func.func`.

Also, we can do the same for `isgeneratorfunction()` and `isasyncgenfunction()`.

The patch looks easy and straightforward.

Yuri, what do you think about?

----------
components: Library (Lib)
messages: 327039
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Support functools.partial in inspect.is*function() checks
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34890>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to