From: Fred Drake Date: Wed, 30 Jan 2002 16:15:13 +0000 (+0000) Subject: string.split() docstring described the interpretation of the maxsplit X-Git-Tag: v2.3c1~6758 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1453754fcda8d9f48e484ce39e80ef5b27aada99;p=python 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 d682fc7abc..a416530e5d 100644 --- a/Lib/string.py +++ b/Lib/string.py @@ -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)