diff options
author | Zhikang Yan <2951256653@qq.com> | 2024-10-27 04:57:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-27 04:57:43 (GMT) |
commit | dad34531298fc0ea91b9000aafdd2ea2fce5e54a (patch) | |
tree | 8250e27c253d190a4a6a1e8a1e1b36f9c77d7d3e /Doc/library/inspect.rst | |
parent | c51b56038ba344dece607eb5f035dca544187813 (diff) | |
download | cpython-dad34531298fc0ea91b9000aafdd2ea2fce5e54a.zip cpython-dad34531298fc0ea91b9000aafdd2ea2fce5e54a.tar.gz cpython-dad34531298fc0ea91b9000aafdd2ea2fce5e54a.tar.bz2 |
gh-125633: Add function `ispackage` to stdlib `inspect` (#125634)
---------
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Diffstat (limited to 'Doc/library/inspect.rst')
-rw-r--r-- | Doc/library/inspect.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index 1eaf1cc..892f5ba 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -374,6 +374,13 @@ attributes (see :ref:`import-mod-attrs` for module attributes): Return ``True`` if the object is a bound method written in Python. +.. function:: ispackage(object) + + Return ``True`` if the object is a :term:`package`. + + .. versionadded:: 3.14 + + .. function:: isfunction(object) Return ``True`` if the object is a Python function, which includes functions |