]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
string.split() docstring described the interpretation of the maxsplit
authorFred Drake <fdrake@acm.org>
Wed, 30 Jan 2002 16:16:38 +0000 (16:16 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 30 Jan 2002 16:16:38 +0000 (16:16 +0000)
argument incorrectly.
This closes SF bug #505997.

Lib/string.py

index 913d980bae6df9425f1c1cda80fd5de6dfbeb18f..ec447c2a6a8c6887c190e0733de4069b2f4ad3ce 100644 (file)
@@ -104,9 +104,9 @@ def split(s, sep=None, maxsplit=-1):
     """split(s [,sep [,maxsplit]]) -> list of strings
 
     Return a list of the words in the string s, using sep as the
-    delimiter string.  If maxsplit is given, splits into at most
-    maxsplit words.  If sep is not specified, any whitespace string
-    is a separator.
+    delimiter string.  If maxsplit is given, splits at no more than
+    maxsplit places (resulting in at most maxsplit+1 words).  If sep
+    is not specified, any whitespace string is a separator.
 
     (split and splitfields are synonymous)