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 <rep...@bugs.python.org>
<http://bugs.python.org/issue19146>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to