[3.8] bpo-37206: Unrepresentable default values no longer represented as None. (GH-13933) (GH-16141)

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.
(cherry picked from commit 279f44678c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
Serhiy Storchaka 2019-09-14 13:31:50 +03:00 committed by GitHub
parent 66da347ef0
commit d322abbb83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 251 additions and 252 deletions

View file

@ -705,7 +705,7 @@ sys_unraisablehook(PyObject *module, PyObject *unraisable)
/*[clinic input]
sys.exit
status: object = NULL
status: object = None
/
Exit the interpreter by raising SystemExit(status).
@ -718,7 +718,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. */
PyErr_SetObject(PyExc_SystemExit, status);