bpo-37206: Unrepresentable default values no longer represented as None. (GH-13933)
In ArgumentClinic, value "NULL" should now be used only for unrepresentable default values (like in the optional third parameter of getattr). "None" should be used if None is accepted as argument and passing None has the same effect as not passing the argument at all.
This commit is contained in:
4
Python/clinic/sysmodule.c.h
generated
4
Python/clinic/sysmodule.c.h
generated
@@ -135,7 +135,7 @@ static PyObject *
|
||||
sys_exit(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
PyObject *status = NULL;
|
||||
PyObject *status = Py_None;
|
||||
|
||||
if (!_PyArg_CheckPositional("exit", nargs, 0, 1)) {
|
||||
goto exit;
|
||||
@@ -995,4 +995,4 @@ sys_getandroidapilevel(PyObject *module, PyObject *Py_UNUSED(ignored))
|
||||
#ifndef SYS_GETANDROIDAPILEVEL_METHODDEF
|
||||
#define SYS_GETANDROIDAPILEVEL_METHODDEF
|
||||
#endif /* !defined(SYS_GETANDROIDAPILEVEL_METHODDEF) */
|
||||
/*[clinic end generated code: output=8b250245a1265eef input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=decd687b7631de4b input=a9049054013a1b77]*/
|
||||
|
||||
Reference in New Issue
Block a user