[issue19146] Improvements to traceback module
Claudiu.Popa
report at bugs.python.org
Wed Oct 2 23:13:37 CEST 2013
Claudiu.Popa added the comment:
> I already thought of that, but that doesn't work: the iterator version
> would return the stack in the wrong order (note the .reverse() call in the code).
Then, couldn't this:
stack = list(_extract_stack_iter(_get_stack(f), limit=limit))
stack.reverse()
return stack
be rewritten as this, knowing the fact that _extract_stack_iter returns an iterable?
return reversed(_extract_stack_iter(_get_stack(f), limit=limit))
And in this case, extract_stack_ex could become extract_stack_iter or something like that.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19146>
_______________________________________
More information about the Python-bugs-list
mailing list