From dfb77dbc70558dc16c3ac170fec684eecfb227a5 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 11 May 2008 09:11:40 +0000 Subject: #2809: elaborate str.split docstring a bit. --- Objects/stringobject.c | 3 ++- Objects/unicodeobject.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 9f154f3..9d51854 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -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) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index a8e0e11..935d8b6 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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) -- cgit v0.12