Index: string.py =================================================================== --- string.py (revision 64569) +++ string.py (working copy) @@ -121,6 +121,16 @@ return s.split(sep, maxsplit) splitfields = split +def rsplit(s,sep=None,maxsplit=-1): + """S.rsplit([sep [,maxsplit]]) -> list of strings + + Return a list of the words in the string S, using sep as the + delimiter string, starting at the end of the string and working + to the front. If maxsplit is given, at most maxsplit splits are + done. If sep is not specified or is None, any whitespace string + is a separator.""" + return s.rsplit(sep,maxsplit) +rsplitfields=rsplit # Join fields with optional separator def join(words, sep = ' '): """join(list [,sep]) -> string