Serhiy Storchaka added the comment: The problem with the *depth* parameter is that it adds a burden of choosing the value for the end user. "Oh, there are more deeper code objects, I must increase the depth and rerun dis()!" I think in most cases when that parameter is specified it would be set to some large value like 999 because you don't want to set it too small. Compare for example with the usage of the attribute maxDiff in unittests.
The single depth parameter doesn't adds too much control. You can't enable disassembling functions and method bodies but disable disassembling comprehensions in functions. If you need more control, you should use non-recursive dis() and manually walk the tree of code objects. How much output adds unlimited recursion in comparison with the recursion limited by the first level? As for supporting invalid bytecode, currently the dis module doesn't support it (see issue26694). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11822> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com