mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
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:
parent
d057b896f9
commit
279f44678c
47 changed files with 256 additions and 257 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue