fix flatten loop control issue (break -> continue)

fix issue #69012
This commit is contained in:
pseudocoder 2020-04-17 23:56:10 +03:00 committed by GitHub
parent 44a471f6ba
commit 2127be5ec5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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