Message203623
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 |
|
Date |
User |
Action |
Args |
2013-11-21 12:18:44 | ncoghlan | set | recipients:
+ ncoghlan, Claudiu.Popa |
2013-11-21 12:18:44 | ncoghlan | set | messageid: <1385036324.25.0.19549515904.issue17916@psf.upfronthosting.co.za> |
2013-11-21 12:18:44 | ncoghlan | link | issue17916 messages |
2013-11-21 12:18:43 | ncoghlan | create | |
|