Nick Coghlan added the comment: My apologies for not reviewing this earlier, it's been a somewhat hectic month. Thanks for pinging the ticket while there's still a chance to get this into 3.4 :)
After my last round of updates to dis.Bytecode removed the potential for confusion between line_offset and current_offset, I'm back to thinking it makes more sense to build this feature directly into dis.Bytecode rather than using a separate type. 1. Add the "current_offset" attribute to dis.Bytecode 2. Add a "current_offset" parameter to dis.Bytecode.__init__ (defaulting to None) 3. In dis.Bytecode.dis(), pass "current_offset" as the value for "lasti" in the call to _disassemble_bytes (except for passing -1 if current_offset is None) 4. Add a "from_traceback()" class method that sets current_offset appropriately in the call to build the instance ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17916> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com