Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1453754

Browse files
committed
string.split() docstring described the interpretation of the maxsplit
argument incorrectly. This closes SF bug #505997.
1 parent cf6bfe4 commit 1453754

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/string.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ def split(s, sep=None, maxsplit=-1):
107107
"""split(s [,sep [,maxsplit]]) -> list of strings
108108
109109
Return a list of the words in the string s, using sep as the
110-
delimiter string. If maxsplit is given, splits into at most
111-
maxsplit words. If sep is not specified, any whitespace string
112-
is a separator.
110+
delimiter string. If maxsplit is given, splits at no more than
111+
maxsplit places (resulting in at most maxsplit+1 words). If sep
112+
is not specified, any whitespace string is a separator.
113113
114114
(split and splitfields are synonymous)
115115

0 commit comments

Comments
 (0)