Avoid creation of temporary list object in iflatten

This commit is contained in:
Mikhail Lyundin 2015-09-02 23:12:36 +03:00
parent ea4199f8e1
commit d9fddabe95
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ def iflatten(x):
Similar to ``.flatten()``, but returns iterator instead"""
for el in x:
if is_listlike(el):
for el_ in flatten(el):
for el_ in iflatten(el):
yield el_
else:
yield el