mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 03:02:52 +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 = []
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user