diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2019-09-14 09:24:05 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-14 09:24:05 (GMT) |
| commit | 279f44678c8b84a183f9eeb85e0b086228154497 (patch) | |
| tree | 9cacd41975bf15ab7a94fc5ba6a2df57f8e02ee5 /Objects/clinic/unicodeobject.c.h | |
| parent | d057b896f97e6d7447b9bf9246770c41cf205299 (diff) | |
| download | cpython-279f44678c8b84a183f9eeb85e0b086228154497.zip cpython-279f44678c8b84a183f9eeb85e0b086228154497.tar.gz cpython-279f44678c8b84a183f9eeb85e0b086228154497.tar.bz2 | |
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.
Diffstat (limited to 'Objects/clinic/unicodeobject.c.h')
| -rw-r--r-- | Objects/clinic/unicodeobject.c.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/clinic/unicodeobject.c.h b/Objects/clinic/unicodeobject.c.h index cb35087..c7d6edb 100644 --- a/Objects/clinic/unicodeobject.c.h +++ b/Objects/clinic/unicodeobject.c.h @@ -630,7 +630,7 @@ static PyObject * unicode_lstrip(PyObject *self, PyObject *const *args, Py_ssize_t nargs) { PyObject *return_value = NULL; - PyObject *chars = NULL; + PyObject *chars = Py_None; if (!_PyArg_CheckPositional("lstrip", nargs, 0, 1)) { goto exit; @@ -664,7 +664,7 @@ static PyObject * unicode_rstrip(PyObject *self, PyObject *const *args, Py_ssize_t nargs) { PyObject *return_value = NULL; - PyObject *chars = NULL; + PyObject *chars = Py_None; if (!_PyArg_CheckPositional("rstrip", nargs, 0, 1)) { goto exit; @@ -1045,7 +1045,7 @@ unicode_swapcase(PyObject *self, PyObject *Py_UNUSED(ignored)) } PyDoc_STRVAR(unicode_maketrans__doc__, -"maketrans(x, y=None, z=None, /)\n" +"maketrans(x, y=<unrepresentable>, z=<unrepresentable>, /)\n" "--\n" "\n" "Return a translation table usable for str.translate().\n" @@ -1232,4 +1232,4 @@ unicode_sizeof(PyObject *self, PyObject *Py_UNUSED(ignored)) { return unicode_sizeof_impl(self); } -/*[clinic end generated code: output=d9a6ee45ddd0ccfd input=a9049054013a1b77]*/ +/*[clinic end generated code: output=5e15747f78f18329 input=a9049054013a1b77]*/ |
