[issue11822] Improve disassembly to show embedded code objects

Nick Coghlan report at bugs.python.org
Mon Apr 17 00:42:59 EDT 2017


Nick Coghlan added the comment:

Yeah, I was mixing this up with getargspec (et al), which get used by IDEs and similar tools. While third party tools do use the disassembler, they typically won't use its display logic directly unless they're just dumping the output to a terminal equivalent.

Given that, a "depth=None" parameter on `dis` and `disassemble` would provide the default behaviour of rendering the entire compilation tree, while still allowing turning off recursion entirely ("depth=0"), or limiting it to a desired number of levels ("depth=1", etc).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11822>
_______________________________________


More information about the Python-bugs-list mailing list