17 Mar
2014
17 Mar
'14
5:41 p.m.
On Tue, 18 Mar 2014 03:38:47 +1000
Nick Coghlan
(while looking at this, I was surprised that dis.dis(some_module) 1) doesn't show a disassembly for the module toplevel 2) shows disassembly for objects which some_module imports from other modules)
I don't think we have any tests to see how dis.dis behaves with module objects - it's likely just hitting the path that is designed to disassemble all methods on a class. (We throw away the bytecode after execution for classes as well)
A comment in dis.dis's source code does talk about modules, so apparently someone thought about them, but not very hard :-) (edit: that someone is you - b2a9a59c2d57 ;-P) Regards Antoine.