This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Claudiu.Popa
Recipients Claudiu.Popa, akuchling, benjamin.peterson, gvanrossum, serhiy.storchaka, vstinner
Date 2013-10-02.21:13:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1380748417.04.0.589537531572.issue19146@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2013-10-02 21:13:37Claudiu.Popasetrecipients: + Claudiu.Popa, gvanrossum, akuchling, vstinner, benjamin.peterson, serhiy.storchaka
2013-10-02 21:13:37Claudiu.Popasetmessageid: <1380748417.04.0.589537531572.issue19146@psf.upfronthosting.co.za>
2013-10-02 21:13:37Claudiu.Popalinkissue19146 messages
2013-10-02 21:13:36Claudiu.Popacreate