Mailing List Archive

cpython (2.7): #14763: document default maxsplit value for str.split.
http://hg.python.org/cpython/rev/0415ecd7b0e3
changeset: 76855:0415ecd7b0e3
branch: 2.7
parent: 76853:299dc54ad014
user: Ezio Melotti <ezio.melotti@gmail.com>
date: Thu May 10 15:30:42 2012 +0300
summary:
#14763: document default maxsplit value for str.split.

files:
Doc/library/stdtypes.rst | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -1161,8 +1161,8 @@
Return a list of the words in the string, using *sep* as the delimiter
string. If *maxsplit* is given, at most *maxsplit* splits are done (thus,
the list will have at most ``maxsplit+1`` elements). If *maxsplit* is not
- specified, then there is no limit on the number of splits (all possible
- splits are made).
+ specified or ``-1``, then there is no limit on the number of splits
+ (all possible splits are made).

If *sep* is given, consecutive delimiters are not grouped together and are
deemed to delimit empty strings (for example, ``'1,,2'.split(',')`` returns

--
Repository URL: http://hg.python.org/cpython