Nick Coghlan added the comment: I didn't want to add a second argument to turn off the new behaviour, so I changed it such that passing a value < 0 for "nested" turns off the new feature entirely. Levels >= 0 enable it, defining which level to start with. The default level is "0" so there's no implied prefix, and nested code objects are displayed by default. This picks up at least comprehensions, lambda expressions and nested functions. I haven't checked how it handles nested classes yet.
I used this feature to get the old tests passing again by turning off the recursion feature. New tests for the new behaviour are still needed. I also tweaked the header to show the *name* of the code object. The full repr is to noisy, but the generic message was hard to read when there were multiple nested code objects. ---------- Added file: http://bugs.python.org/file36566/issue11822_nested_disassembly_with_off_switch.diff _______________________________________ 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