diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-06-17 15:15:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-17 15:15:36 (GMT) |
commit | 5352cc41fa4eb5f0dc847709392e88473b8593b0 (patch) | |
tree | 52e61a0ba8c225290589b6907606004e67db54cc /Doc/c-api/object.rst | |
parent | 1b8a46d59734a77cd1f5ffcf3bdfcaafd58a87e7 (diff) | |
download | cpython-5352cc41fa4eb5f0dc847709392e88473b8593b0.zip cpython-5352cc41fa4eb5f0dc847709392e88473b8593b0.tar.gz cpython-5352cc41fa4eb5f0dc847709392e88473b8593b0.tar.bz2 |
bpo-37194: Add PyObject_CallNoArgs() rationale (GH-14159)
Explain in the doc why PyObject_CallNoArgs() should be preferred over
other existing ways to call a function without any arguments.
Diffstat (limited to 'Doc/c-api/object.rst')
-rw-r--r-- | Doc/c-api/object.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index e4787ad..13f13b3 100644 --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -255,7 +255,8 @@ Object Protocol .. c:function:: PyObject* PyObject_CallNoArgs(PyObject *callable) - Call a callable Python object *callable* without any arguments. + Call a callable Python object *callable* without any arguments. It is the + most efficient way to call a callable Python object without any argument. Return the result of the call on success, or raise an exception and return *NULL* on failure. |