George King added the comment: I've updated the patch and I think it's ready for a more serious review. A few notes:
* settracestate now takes a flag `trace_instructions`. This describes slightly better the behavior, which is that line events take precedence over instructions. * the old gettrace now raises when `trace_instructions` was set, to prevent silent failure of the old idiom `saved = gettrace(); ... settrace(saved)`. * gettracestate returns a dictionary, which can be passed to settracestate as kwargs. This allows for a replacement idiom `saved = gettracestate(); ... settracestate(**saved)` which should be forward-compatible with any flags we might add in the future. The patch can be viewed here: https://github.com/python/cpython/compare/master...gwk:trace-inst Let me know if I should open up an official PR. Also I just filled out the CLA. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29400> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com