mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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
|
@ -107,12 +107,12 @@ class structseq "PyStructSequence *" "NULL"
|
|||
@classmethod
|
||||
structseq.__new__ as structseq_new
|
||||
sequence as arg: object
|
||||
dict: object = NULL
|
||||
dict: object(c_default="NULL") = {}
|
||||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
structseq_new_impl(PyTypeObject *type, PyObject *arg, PyObject *dict)
|
||||
/*[clinic end generated code: output=baa082e788b171da input=9b44810243907377]*/
|
||||
/*[clinic end generated code: output=baa082e788b171da input=90532511101aa3fb]*/
|
||||
{
|
||||
PyObject *ob;
|
||||
PyStructSequence *res = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue