summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-09-14 09:24:05 (GMT)
committerGitHub <noreply@github.com>2019-09-14 09:24:05 (GMT)
commit279f44678c8b84a183f9eeb85e0b086228154497 (patch)
tree9cacd41975bf15ab7a94fc5ba6a2df57f8e02ee5 /Objects/unicodeobject.c
parentd057b896f97e6d7447b9bf9246770c41cf205299 (diff)
downloadcpython-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/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index d4b2c93..070f795 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -12522,7 +12522,7 @@ do_strip(PyObject *self, int striptype)
static PyObject *
do_argstrip(PyObject *self, int striptype, PyObject *sep)
{
- if (sep != NULL && sep != Py_None) {
+ if (sep != Py_None) {
if (PyUnicode_Check(sep))
return _PyUnicode_XStrip(self, striptype, sep);
else {
@@ -12559,7 +12559,7 @@ unicode_strip_impl(PyObject *self, PyObject *chars)
/*[clinic input]
str.lstrip as unicode_lstrip
- chars: object = NULL
+ chars: object = None
/
Return a copy of the string with leading whitespace removed.
@@ -12569,7 +12569,7 @@ If chars is given and not None, remove characters in chars instead.
static PyObject *
unicode_lstrip_impl(PyObject *self, PyObject *chars)
-/*[clinic end generated code: output=3b43683251f79ca7 input=9e56f3c45f5ff4c3]*/
+/*[clinic end generated code: output=3b43683251f79ca7 input=529f9f3834448671]*/
{
return do_argstrip(self, LEFTSTRIP, chars);
}
@@ -12578,7 +12578,7 @@ unicode_lstrip_impl(PyObject *self, PyObject *chars)
/*[clinic input]
str.rstrip as unicode_rstrip
- chars: object = NULL
+ chars: object = None
/
Return a copy of the string with trailing whitespace removed.
@@ -12588,7 +12588,7 @@ If chars is given and not None, remove characters in chars instead.
static PyObject *
unicode_rstrip_impl(PyObject *self, PyObject *chars)
-/*[clinic end generated code: output=4a59230017cc3b7a input=ac89d0219cb411ee]*/
+/*[clinic end generated code: output=4a59230017cc3b7a input=62566c627916557f]*/
{
return do_argstrip(self, RIGHTSTRIP, chars);
}