]> granicus.if.org Git - python/commitdiff
string.split() docstring described the interpretation of the maxsplit
authorFred Drake <fdrake@acm.org>
Wed, 30 Jan 2002 16:15:13 +0000 (16:15 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 30 Jan 2002 16:15:13 +0000 (16:15 +0000)
argument incorrectly.
This closes SF bug #505997.

Lib/string.py

index d682fc7abcfed2bcbc5461583445cc2a201bb188..a416530e5d9cd78a78fa77cba6bcc7ddd31a9e3e 100644 (file)
@@ -107,9 +107,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)