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:
@@ -749,7 +749,7 @@ sys_unraisablehook(PyObject *module, PyObject *unraisable)
|
||||
/*[clinic input]
|
||||
sys.exit
|
||||
|
||||
status: object = NULL
|
||||
status: object = None
|
||||
/
|
||||
|
||||
Exit the interpreter by raising SystemExit(status).
|
||||
@@ -762,7 +762,7 @@ exit status will be one (i.e., failure).
|
||||
|
||||
static PyObject *
|
||||
sys_exit_impl(PyObject *module, PyObject *status)
|
||||
/*[clinic end generated code: output=13870986c1ab2ec0 input=a737351f86685e9c]*/
|
||||
/*[clinic end generated code: output=13870986c1ab2ec0 input=b86ca9497baa94f2]*/
|
||||
{
|
||||
/* Raise SystemExit so callers may catch it or clean up. */
|
||||
PyThreadState *tstate = _PyThreadState_GET();
|
||||
|
||||
Reference in New Issue
Block a user