Skip to content

bpo-37194: Add PyObject_CallNoArgs() rationale#14159

Merged
vstinner merged 1 commit intopython:masterfrom
vstinner:call_no_args_doc2
Jun 17, 2019
Merged

bpo-37194: Add PyObject_CallNoArgs() rationale#14159
vstinner merged 1 commit intopython:masterfrom
vstinner:call_no_args_doc2

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Jun 17, 2019

Explain in the doc why PyObject_CallNoArgs() should be preferred over
other existing ways to call a function without any arguments.

https://bugs.python.org/issue37194

Explain in the doc why PyObject_CallNoArgs() should be preferred over
other existing ways to call a function without any arguments.
@vstinner
Copy link
Member Author

It is the most efficient way to call a callable Python object without any argument.

To be fair, _PyObject_CallNoArg() should a little bit better, but it's not exposed in the public API :-D

@vstinner vstinner merged commit 5352cc4 into python:master Jun 17, 2019
@vstinner vstinner deleted the call_no_args_doc2 branch June 17, 2019 15:15
lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
Explain in the doc why PyObject_CallNoArgs() should be preferred over
other existing ways to call a function without any arguments.
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
Explain in the doc why PyObject_CallNoArgs() should be preferred over
other existing ways to call a function without any arguments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants