<p dir="ltr">I'm still interested in this proposal. If I write a patch, how do I go about getting it accepted? </p>
<p dir="ltr">The previous reply was wrong, sorry about that.</p>
<div class="gmail_quote">On Aug 24, 2014 9:53 PM, "Guido van Rossum" <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I like this. It's kind of sad that when the limit causes truncation of the traceback it drops the most recent frames, which might give a hint as to what happens, and keeps the oldest frames, which are usually less interesting (I know my program started at main() :-).<br>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Aug 24, 2014 at 10:48 AM, Thomas Allen <span dir="ltr"><<a href="mailto:jsbfox@gmail.com" target="_blank">jsbfox@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'd like to propose adding the ability to extract last n stack trace<br>
entries from a traceback using functions from traceback module. Simply<br>
put, passing limit=-n would make functions to return (or print or<br>
yield) last abs(n) entries. No-brainer implementation for extract_tb:<br>
<br>
    extracted = list(_extract_tb_iter(tb, limit=(limit, None)[limit < 0]))<br>
    if limit is not None and limit < 0:<br>
        return extracted[limit:]<br>
    return extracted<br>
<br>
The motivation: <a href="http://stackoverflow.com/q/25472412/2301450" target="_blank">http://stackoverflow.com/q/25472412/2301450</a><br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)
</div>
</blockquote></div>