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 = [] acc = []
for element in iterable: for element in iterable:
if isSeparator(element): if isSeparator(element):
if yieldEmpty or acc: if acc or yieldEmpty:
yield acc yield acc
acc = [] acc = []
else: else:
acc.append(element) acc.append(element)
if yieldEmpty or acc: if acc or yieldEmpty:
yield acc yield acc
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: # vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: