Show More
@@ -917,17 +917,19 def _flatten(thing): | |||
|
917 | 917 | '''yield a single stream from a possibly nested set of iterators''' |
|
918 | 918 | if isinstance(thing, str): |
|
919 | 919 | yield thing |
|
920 | elif thing is None: | |
|
921 | pass | |
|
920 | 922 | elif not util.safehasattr(thing, '__iter__'): |
|
921 | if thing is not None: | |
|
922 | 923 |
|
|
923 | 924 | else: |
|
924 | 925 | for i in thing: |
|
925 | 926 | if isinstance(i, str): |
|
926 | 927 | yield i |
|
928 | elif i is None: | |
|
929 | pass | |
|
927 | 930 | elif not util.safehasattr(i, '__iter__'): |
|
928 | if i is not None: | |
|
929 | 931 |
|
|
930 |
el |
|
|
932 | else: | |
|
931 | 933 | for j in _flatten(i): |
|
932 | 934 | yield j |
|
933 | 935 |
General Comments 0
You need to be logged in to leave comments.
Login now