mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
[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:
parent
66da347ef0
commit
d322abbb83
45 changed files with 251 additions and 252 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue