Remove trailing spaces in simple_split with keep=False.

Fixes #279.
This commit is contained in:
Florian Bruhin 2014-11-30 18:59:51 +01:00
parent 9d28c59a28
commit 9327c2a9ae

View File

@ -205,4 +205,5 @@ def simple_split(s, keep=False, maxsplit=None):
else:
pattern = '[' + whitespace + ']'
parts = re.split(pattern, s, maxsplit)
parts[-1] = parts[-1].rstrip()
return [p for p in parts if p]