Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libstring.tex @ 31735:ee0ba00b277c legacy-trunk
Modified string.split documentation to reflect behaviour of splitting emtpy string. Closes SF bug #811604
| author | Nicholas Bastin <nick.bastin@gmail.com> |
|---|---|
| date | Sun, 21 Mar 2004 16:59:59 +0000 |
| parents | 2cd96629fe8d |
| children | 61be904a1d4e |
line wrap: on
line diff
--- a/Doc/lib/libstring.tex Sun Mar 21 16:59:09 2004 +0000 +++ b/Doc/lib/libstring.tex Sun Mar 21 16:59:59 2004 +0000 @@ -213,6 +213,11 @@ and the remainder of the string is returned as the final element of the list (thus, the list will have at most \code{\var{maxsplit}+1} elements). + + The behavior of split on an empty string depends on the value of \var{sep}. + If \var{sep} is not specified, or specified as \code{None}, the result will + be an empty list. If \var{sep} is specified as any string, the result will + be a list containing one element which is an empty string. \end{funcdesc} \begin{funcdesc}{rsplit}{s\optional{, sep\optional{, maxsplit}}}
