fix flatten loop control issue (break -> continue)

fix issue #69012
pull/69013/head
pseudocoder 5 years ago committed by GitHub
parent 44a471f6ba
commit 2127be5ec5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -467,7 +467,7 @@ def flatten(mylist, levels=None):
for element in mylist: for element in mylist:
if element in (None, 'None', 'null'): if element in (None, 'None', 'null'):
# ignore undefined items # ignore undefined items
break continue
elif is_sequence(element): elif is_sequence(element):
if levels is None: if levels is None:
ret.extend(flatten(element)) ret.extend(flatten(element))

Loading…
Cancel
Save