[TIP] Annotated tracebacks
robertc at robertcollins.net
Sun Mar 29 14:18:05 PDT 2015
On 23 October 2014 at 06:27, Fernando Perez <fperez.net at gmail.com> wrote:
> sorry to parachute in, but you may want to steal code from IPython's
> %xmode verbose
> exception reporting mode, which does extract call signature values as well
> as all locals at the point of the exception. Old code, crufty and not
> perfect by any means, but it could be a start.
Thanks for the pointer to that. I did have an eyeball, but ended up
with a minimal (but extendible) implementation of just the very core
thing in cPython itself.
The way I got there was ncoghlan pointing me at a feature request from
Guido that had turned into 'rewrite traceback', so I took that on,
rewrote it, and added in the itch I had at the same time.
I've created backports - linecache2 and traceback2 - of the new stdlib
code back through 3.2 and 2.6,2.7... and will be maintaining those. So
- for the additional features, if folk can submit patches to
bugs.python.org we can apply them upstream and I'll backport promptly.
Robert Collins <rbtcollins at hp.com>
HP Converged Cloud
More information about the testing-in-python