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:
Serhiy Storchaka 2019-09-14 12:24:05 +03:00 committed by GitHub
parent d057b896f9
commit 279f44678c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 256 additions and 257 deletions

View file

@ -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();