<p dir="ltr"><br>
On 18 Mar 2014 03:45, "Antoine Pitrou" <<a href="mailto:solipsis@pitrou.net">solipsis@pitrou.net</a>> wrote:<br>
><br>
> On Tue, 18 Mar 2014 03:38:47 +1000<br>
> Nick Coghlan <<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>> wrote:<br>
> > ><br>
> > > (while looking at this, I was surprised that dis.dis(some_module)<br>
> > > 1) doesn't show a disassembly for the module toplevel 2) shows<br>
> > > disassembly for objects which some_module imports from other modules)<br>
> ><br>
> > I don't think we have any tests to see how dis.dis behaves with module<br>
> > objects - it's likely just hitting the path that is designed to disassemble<br>
> > all methods on a class. (We throw away the bytecode after execution for<br>
> > classes as well)<br>
><br>
> A comment in dis.dis's source code does talk about modules, so<br>
> apparently someone thought about them, but not very hard :-)<br>
><br>
> (edit: that someone is you - b2a9a59c2d57 ;-P)</p>
<p dir="ltr">Huh, clearly I put a lot of thought into that one... </p>
<p dir="ltr">One day I will learn to go check the source rather than speculating from memory, but apparently yesterday is not that day :)</p>
<p dir="ltr">Cheers,<br>
Nick.</p>
<p dir="ltr">><br>
> Regards<br>
><br>
> Antoine.<br>
><br>
><br>
> _______________________________________________<br>
> Python-ideas mailing list<br>
> <a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/python-ideas">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
> Code of Conduct: <a href="http://python.org/psf/codeofconduct/">http://python.org/psf/codeofconduct/</a><br>
</p>