This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author IliyaZinoviev
Recipients IliyaZinoviev
Date 2022-02-11.15:26:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1644593209.5.0.742878484415.issue46722@roundup.psfhosted.org>
In-reply-to
Content
1) isfunction() returns `True` for partial object only when one passes `func` attribute of it.
2) For instance, `isgeneratorfunction()` and `iscoroutinefunction()` for partial obj work with passing partial obj as well as with passing `func` attr of this obj, when obj is partially applied generator function or partially applied coroutine function respectively.

I offer to unify behavior for handling partial object for r'inspect.is*function()' by the next way:
1) Add `functools._unwrap_partial()` to `inspect.isfunction()` as well as it were done in other r'inspect.is*function()'.

P.S.I'm ready to deal with this issue.  

Python 3.10.2 (main, Jan 15 2022, 19:56:27) [GCC 11.1.0]
Type 'copyright', 'credits' or 'license' for more information

Operating System: Manjaro Linux
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.4.176-1-MANJARO (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-6200U CPU @ 2.30GHz
Memory: 11.6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 520
History
Date User Action Args
2022-02-11 15:26:49IliyaZinovievsetrecipients: + IliyaZinoviev
2022-02-11 15:26:49IliyaZinovievsetmessageid: <1644593209.5.0.742878484415.issue46722@roundup.psfhosted.org>
2022-02-11 15:26:49IliyaZinovievlinkissue46722 messages
2022-02-11 15:26:49IliyaZinovievcreate