splitwords: prevent to split to empty values by multiple separator characters together

This commit is contained in:
sebres 2016-05-23 15:33:45 +02:00
parent 01d0506ea0
commit 156065e70d

View file

@ -136,4 +136,4 @@ def splitwords(s):
"""
if not s:
return []
return filter(bool, map(str.strip, re.split('[ ,\n]', s)))
return filter(bool, map(str.strip, re.split('[ ,\n]+', s)))