On 18 Mar 2014 03:45, "Antoine Pitrou"
On Tue, 18 Mar 2014 03:38:47 +1000 Nick Coghlan
wrote: (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)
Huh, clearly I put a lot of thought into that one... One day I will learn to go check the source rather than speculating from memory, but apparently yesterday is not that day :) Cheers, Nick.
Regards
Antoine.
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/