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 vstinner
Recipients larry, python-dev, r.david.murray, vstinner
Date 2014-03-11.07:26:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1394522770.98.0.841263559175.issue20888@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-03-11 07:26:11vstinnersetrecipients: + vstinner, larry, r.david.murray, python-dev
2014-03-11 07:26:10vstinnersetmessageid: <1394522770.98.0.841263559175.issue20888@psf.upfronthosting.co.za>
2014-03-11 07:26:10vstinnerlinkissue20888 messages
2014-03-11 07:26:10vstinnercreate