Message203623
| Author |
ncoghlan |
| Recipients |
Claudiu.Popa, ncoghlan |
| Date |
2013年11月21日.12:18:43 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1385036324.25.0.19549515904.issue17916@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 |
|
History
|
|---|
| 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 |
|