[issue23967] Make inspect.signature expression evaluation more powerful

Peter McCormick report at bugs.python.org
Thu Apr 16 08:33:07 CEST 2015


Peter McCormick added the comment:

This definitely works for the _socket.listen use case!

In terms of generating such a signature using Argument Clinic, currently this is required:

    backlog: int(py_default="builtins.min(SOMAXCONN, 128)", c_default="Py_MIN(SOMAXCONN, 128)") = 000


The attached patch lets Tools/clinic/clinic.py make an exception when both C and Python defaults are specified, simplifying the above to: 

    backlog: int(py_default="builtins.min(SOMAXCONN, 128)", c_default="Py_MIN(SOMAXCONN, 128)")

----------
keywords: +patch
Added file: http://bugs.python.org/file39066/pdm-argument_clinic-mixed_py_and_c_defaults-v1.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23967>
_______________________________________


More information about the Python-bugs-list mailing list