mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-20 01:19:26 +01:00
Removed a useless if statement and changed the order of another
This commit is contained in:
parent
30591187ad
commit
042f4555a0
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user