Added docstring for rsplit.

This commit is contained in:
Jeremy Fincher 2003-10-03 00:08:30 +00:00
parent ff6fdf02f3
commit ff2e043f00

View File

@ -122,6 +122,7 @@ def all(p, seq):
return True
def rsplit(s, sep=None, maxsplit=-1):
"""Equivalent to str.split, except splitting from the right."""
if sep is not None:
sep = sep[::-1]
L = s[::-1].split(sep, maxsplit)