From: Fred Drake Date: Wed, 30 Jan 2002 16:16:38 +0000 (+0000) Subject: string.split() docstring described the interpretation of the maxsplit X-Git-Tag: v2.1.3~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c81ed6a5ad6fe23ff4ce095f60a6a04ac6b7f91;p=thirdparty%2FPython%2Fcpython.git string.split() docstring described the interpretation of the maxsplit argument incorrectly. This closes SF bug #505997. --- diff --git a/Lib/string.py b/Lib/string.py index 913d980bae6d..ec447c2a6a8c 100644 --- a/Lib/string.py +++ b/Lib/string.py @@ -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)