]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-108915: Removes extra backslashes in str.split docstring (GH-109044). ...
authorShantanu <12621235+hauntsaninja@users.noreply.github.com>
Fri, 8 Sep 2023 13:19:38 +0000 (06:19 -0700)
committerGitHub <noreply@github.com>
Fri, 8 Sep 2023 13:19:38 +0000 (15:19 +0200)
* [3.12] gh-108915: Removes extra backslashes in str.split docstring (GH-109044).
(cherry picked from commit e7d5433f944a5725aa82595f9251abfc8a63d333)

Co-authored-by: Daniel Weiss <134341009+justdan6@users.noreply.github.com>
* re-clinic

---------

Co-authored-by: Daniel Weiss <134341009+justdan6@users.noreply.github.com>
Objects/clinic/unicodeobject.c.h
Objects/unicodeobject.c

index f640c997577363bc4c12489456ebf1b37adc21da..d3769eb079f0a2f011451fa21053dbe31459add0 100644 (file)
@@ -934,7 +934,7 @@ PyDoc_STRVAR(unicode_split__doc__,
 "    The separator used to split the string.\n"
 "\n"
 "    When set to None (the default value), will split on any whitespace\n"
-"    character (including \\\\n \\\\r \\\\t \\\\f and spaces) and will discard\n"
+"    character (including \\n \\r \\t \\f and spaces) and will discard\n"
 "    empty strings from the result.\n"
 "  maxsplit\n"
 "    Maximum number of splits (starting from the left).\n"
@@ -1058,7 +1058,7 @@ PyDoc_STRVAR(unicode_rsplit__doc__,
 "    The separator used to split the string.\n"
 "\n"
 "    When set to None (the default value), will split on any whitespace\n"
-"    character (including \\\\n \\\\r \\\\t \\\\f and spaces) and will discard\n"
+"    character (including \\n \\r \\t \\f and spaces) and will discard\n"
 "    empty strings from the result.\n"
 "  maxsplit\n"
 "    Maximum number of splits (starting from the left).\n"
@@ -1497,4 +1497,4 @@ skip_optional_pos:
 exit:
     return return_value;
 }
-/*[clinic end generated code: output=05d942840635dadf input=a9049054013a1b77]*/
+/*[clinic end generated code: output=32edbbf75dc8a03b input=a9049054013a1b77]*/
index 3fbc2d297cdd56273f8d9ba4bc34923fe33708f0..26aa13913d98a0adc05999b4eccf1e6c2bf77a13 100644 (file)
@@ -12361,7 +12361,7 @@ str.split as unicode_split
         The separator used to split the string.
 
         When set to None (the default value), will split on any whitespace
-        character (including \\n \\r \\t \\f and spaces) and will discard
+        character (including \n \r \t \f and spaces) and will discard
         empty strings from the result.
     maxsplit: Py_ssize_t = -1
         Maximum number of splits (starting from the left).
@@ -12377,7 +12377,7 @@ the regular expression module.
 
 static PyObject *
 unicode_split_impl(PyObject *self, PyObject *sep, Py_ssize_t maxsplit)
-/*[clinic end generated code: output=3a65b1db356948dc input=906d953b44efc43b]*/
+/*[clinic end generated code: output=3a65b1db356948dc input=07b9040d98c5fe8d]*/
 {
     if (sep == Py_None)
         return split(self, NULL, maxsplit);