Message181970
I've updated Nick's patch so that test_dis and test_peephole pass again, and added a prototype ByteCode class (without any docs or tests for now, to allow for API discussion).
The prototype ByteCode is instantiated with any of the objects that get_instructions already accepts (functions, methods, code strings & code objects). Iterating over it yields Instruction objects. It has info(), show_info() and display_code() methods, which correspond to the code_info(), show_code() and disassemble() functions.
I've tried to go for names that make sense, rather than names that fit the existing pattern, because the existing pattern feels a bit messy. E.g. the show_code() function doesn't actually show the code, so I've called its method equivalent show_info(). |
|
Date |
User |
Action |
Args |
2013-02-12 17:50:03 | takluyver | set | recipients:
+ takluyver, loewis, rhettinger, jcea, ncoghlan, belopolsky, ron_adam, alex, rfk, meador.inge, eric.snow, yselivanov |
2013-02-12 17:50:01 | takluyver | set | messageid: <1360691401.97.0.507125095248.issue11816@psf.upfronthosting.co.za> |
2013-02-12 17:50:01 | takluyver | link | issue11816 messages |
2013-02-12 17:50:00 | takluyver | create | |
|