New submission from Antony Lee <anntzer....@gmail.com>:
It would be nice if METH_NOARGS extension methods had an autogenerated signature (or rather, autogenerated __text_signature__ that gets picked up by inspect.signature). After all, the signature is trivially known at compile time. The same *could* possibly be done for METH_O methods, for which the effective signature is known too. The *name* of the sole parameter is not known, but given that the parameter is (I believe?) positional only, that name "shouldn't" really matter (in the sense, e.g., that whether `signature.bind()` succeeds or not doesn't depend on the parameter name). ---------- components: C API messages: 368830 nosy: Antony.Lee priority: normal severity: normal status: open title: Autogenerate signature for METH_NOARGS and perhaps METH_O extension functions versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40625> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com