Skip to content

bpo-11822: Improve disassembly to show embedded code objects.#1155

Closed
serhiy-storchaka wants to merge 3 commits intopython:masterfrom
serhiy-storchaka:dis-recursive
Closed

bpo-11822: Improve disassembly to show embedded code objects.#1155
serhiy-storchaka wants to merge 3 commits intopython:masterfrom
serhiy-storchaka:dis-recursive

Conversation

@serhiy-storchaka
Copy link
Copy Markdown
Member

No description provided.

@serhiy-storchaka serhiy-storchaka added the type-feature A feature request or enhancement label Apr 15, 2017
@mention-bot
Copy link
Copy Markdown

@serhiy-storchaka, thanks for your PR! By analyzing the history of the files in this pull request, we identified @ncoghlan, @birkenfeld and @benjaminp to be potential reviewers.

Copy link
Copy Markdown
Contributor

@ncoghlan ncoghlan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting this RFE moving again!

I think there may be some usability and robustness problems with a simple all-or-nothing flag for the recursive behaviour, so I've posted that question back on the original issue: https://bugs.python.org/issue11822#msg291718

Comment thread Lib/dis.py
if hasattr(x, 'co_code'):
print(file=file)
print("Disassembly of %r:" % (x,), file=file)
disassemble(x, file=file, recursive=True)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has the potential to get very noisy if disassembling a whole module, so I've posted a design question back on the original issue: https://bugs.python.org/issue11822#msg291718

I'd prefer to keep that discussion on the issue tracker, so I won't duplicate it here.

@ncoghlan
Copy link
Copy Markdown
Contributor

ncoghlan commented May 29, 2017

As per the discussion at https://bugs.python.org/issue11822#msg291780, I still prefer the approach with the depth parameter, but amended so the default is depth=None to automatically render the entire tree.

Link to Serhiy's PR with the depth parameter instead of the recursive flag: #1844

@serhiy-storchaka
Copy link
Copy Markdown
Member Author

Closed in favor of #1844.

@serhiy-storchaka serhiy-storchaka deleted the dis-recursive branch June 11, 2017 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants