Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bc552ce

Browse files
committed
SF 582071 clarified the .split() method's docstring to note that sep=None
will trigger splitting on any whitespace.
1 parent acb45d7 commit bc552ce

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Objects/stringobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,8 +1126,8 @@ PyDoc_STRVAR(split__doc__,
11261126
\n\
11271127
Return a list of the words in the string S, using sep as the\n\
11281128
delimiter string. If maxsplit is given, at most maxsplit\n\
1129-
splits are done. If sep is not specified, any whitespace string\n\
1130-
is a separator.");
1129+
splits are done. If sep is not specified or is None, any\n\
1130+
whitespace string is a separator.");
11311131

11321132
static PyObject *
11331133
string_split(PyStringObject *self, PyObject *args)

0 commit comments

Comments
 (0)