Skip to content

Refactor dis module to separate instructions creation from formatting #112720

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
iritkatriel opened this issue Dec 4, 2023 · 3 comments
Closed
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@iritkatriel
Copy link
Member

iritkatriel commented Dec 4, 2023

The dis module is not very flexible, because the formatting and instruction creation are all entangled with one another. I will refactor it so that we are able to feed an instruction sequence to a formatter, or to plug in a different formatter into dis functions.

Linked PRs

@terryjreedy
Copy link
Member

Nice. This should aid testing and would allow an IDE, for instance, to more easily put dis output in a GUI panel. I might think about putting a tkinter option in dis itself.

iritkatriel added a commit that referenced this issue Dec 9, 2023
… to a new class dis.InstructionFormatter. Add the ArgResolver class. (#112722)
iritkatriel added a commit that referenced this issue Dec 15, 2023
…up to the arg_resolver. Reduce the number of parameters passed around. (#113108)
corona10 pushed a commit to corona10/cpython that referenced this issue Dec 15, 2023
…s lookup to the arg_resolver. Reduce the number of parameters passed around. (python#113108)
@hugovk
Copy link
Member

hugovk commented Jan 11, 2024

Triage: the linked PRs are merged, can this be closed?

@iritkatriel
Copy link
Member Author

There will probably be more in this space, but I can reopen if so.

aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
… class to a new class dis.InstructionFormatter. Add the ArgResolver class. (python#112722)
aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
…s lookup to the arg_resolver. Reduce the number of parameters passed around. (python#113108)
@iritkatriel iritkatriel reopened this Feb 16, 2024
iritkatriel added a commit to iritkatriel/cpython that referenced this issue Feb 16, 2024
iritkatriel added a commit to iritkatriel/cpython that referenced this issue Feb 16, 2024
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this issue Mar 4, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this issue Apr 17, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
… class to a new class dis.InstructionFormatter. Add the ArgResolver class. (python#112722)
Glyphack pushed a commit to Glyphack/cpython that referenced this issue Sep 2, 2024
…s lookup to the arg_resolver. Reduce the number of parameters passed around. (python#113108)
LukasWoodtli pushed a commit to LukasWoodtli/cpython that referenced this issue Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants