[Python-ideas] Function-like Modules (better control/introspection)

Nick Coghlan ncoghlan at gmail.com
Tue Mar 18 00:32:55 CET 2014


On 18 Mar 2014 03:45, "Antoine Pitrou" <solipsis at pitrou.net> wrote:
>
> On Tue, 18 Mar 2014 03:38:47 +1000
> Nick Coghlan <ncoghlan at gmail.com> 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 at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140318/5d098d50/attachment-0001.html>


More information about the Python-ideas mailing list