Message181970
| Author |
takluyver |
| Recipients |
alex, belopolsky, eric.snow, jcea, loewis, meador.inge, ncoghlan, rfk, rhettinger, ron_adam, takluyver, yselivanov |
| Date |
2013年02月12日.17:49:56 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1360691401.97.0.507125095248.issue11816@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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(). |
|
History
|
|---|
| 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 |
|