]> granicus.if.org Git - python/commitdiff
#2809: elaborate str.split docstring a bit.
authorGeorg Brandl <georg@python.org>
Sun, 11 May 2008 09:11:40 +0000 (09:11 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 11 May 2008 09:11:40 +0000 (09:11 +0000)
Objects/stringobject.c
Objects/unicodeobject.c

index 9f154f3e1e4679f788171ac6708d7a99d1197471..9d518541ec7f9760686240b58870a16c696b3cb9 100644 (file)
@@ -1498,7 +1498,8 @@ PyDoc_STRVAR(split__doc__,
 Return a list of the words in the string S, using sep as the\n\
 delimiter string.  If maxsplit is given, at most maxsplit\n\
 splits are done. If sep is not specified or is None, any\n\
-whitespace string is a separator.");
+whitespace string is a separator and leading and trailing\n\
+whitespace is stripped before splitting.");
 
 static PyObject *
 string_split(PyStringObject *self, PyObject *args)
index a8e0e11cb3e1e1c2e3dda591896ccfe64587ec8c..935d8b6652815bc6e3d5f3c3e9c410d0215d58d6 100644 (file)
@@ -7494,8 +7494,9 @@ PyDoc_STRVAR(split__doc__,
 \n\
 Return a list of the words in S, using sep as the\n\
 delimiter string.  If maxsplit is given, at most maxsplit\n\
-splits are done. If sep is not specified or is None,\n\
-any whitespace string is a separator.");
+splits are done. If sep is not specified or is None, any\n\
+whitespace string is a separator and leading and trailing\n\
+whitespace is stripped before splitting.");
 
 static PyObject*
 unicode_split(PyUnicodeObject *self, PyObject *args)