utilize yield from

This commit is contained in:
Philip Jenvey 2012-10-01 12:53:43 -07:00
parent 075bbb176f
commit 4993cc0a5b
11 changed files with 18 additions and 36 deletions

View file

@ -132,8 +132,7 @@ def _iter_chain(exc, custom_tb=None, seen=None):
its.append([(exc, custom_tb or exc.__traceback__)])
# itertools.chain is in an extension module and may be unavailable
for it in its:
for x in it:
yield x
yield from it
def print_exception(etype, value, tb, limit=None, file=None, chain=True):