Kevin Shweh <kevin.sh...@gmail.com> added the comment:
Frankly, it doesn't make sense that isgeneratorfunction or iscoroutinefunction unwrap partials at all. The original justification for making them do that back in https://bugs.python.org/issue34890 was invalid - the original argument was that isfunction unwraps partials, but it doesn't, and I don't think it ever did. isfunction is supposed to be a very specific check for Python function objects. It rejects all sorts of other callables, like sum (a built-in function), super (a type), or method objects (which wrap functions in a very similar way to partial). Having it be a check for *either* a Python function object *or* a partial object wrapping a Python function object seems to just make it less useful. ---------- nosy: +Kevin Shweh _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46722> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com