Message213124
The method name should be "get_line", not "getline", to conform to the PEP 8.
It's not very useful to add an helper to the Traceback, it's more interesting to add it to the Trace class. So linecache.getline(trace.traceback[0].filename, trace.traceback[0].lineno) just becomes trace.get_line().
I updated the patch: tracemalloc_get_line-2.patch.
> Yes it is too late.
Ok. I applied to most interesting change (on the documentation) for Python 3.4.1.
About the patch, is it a bad thing to add new methods (get_line) to such debug module in a minor version (3.4.1)? It can be surprising if sometimes try the same code on Python 3.4.1 and 3.4.0.
Well, the proposed addition is just an helper, linecache can still used ;-) It's just convinient to write "one-shot" script (use and delete) using tracemalloc. |
|
Date |
User |
Action |
Args |
2014-03-11 07:26:11 | vstinner | set | recipients:
+ vstinner, larry, r.david.murray, python-dev |
2014-03-11 07:26:10 | vstinner | set | messageid: <1394522770.98.0.841263559175.issue20888@psf.upfronthosting.co.za> |
2014-03-11 07:26:10 | vstinner | link | issue20888 messages |
2014-03-11 07:26:10 | vstinner | create | |
|