Removed a useless if statement and changed the order of another

This commit is contained in:
Jeremy Fincher 2003-03-28 02:34:03 +00:00
parent 30591187ad
commit 042f4555a0

View File

@ -206,12 +206,12 @@ def itersplit(iterable, isSeparator, yieldEmpty=False):
acc = []
for element in iterable:
if isSeparator(element):
if yieldEmpty or acc:
if acc or yieldEmpty:
yield acc
acc = []
else:
acc.append(element)
if yieldEmpty or acc:
if acc or yieldEmpty:
yield acc
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: