Skip to content

gh-84083: support equality comparisons in dis.Bytecode - #18849

Open
isidentical wants to merge 2 commits into
python:mainfrom
isidentical:bpo-39902
Open

isidentical wants to merge 2 commits into
python:mainfrom
isidentical:bpo-39902

Conversation

@isidentical

@isidentical isidentical commented Mar 8, 2020 •

Copy link
Copy Markdown
Member

Comment thread Lib/dis.py Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I didn't add a check about underlying code object because I think we should compare the bytecode not the source but I'm OK to change it if needed?

>>> dis.Bytecode("print(1)") == dis.Bytecode(compile("print(1)", "<stdin>", "eval"))
True
>>> dis.Bytecode("print(1)")._original_object == dis.Bytecode(compile("print(1)", "<stdin>", "eval"))._original_object
False

Comment thread Doc/whatsnew/3.9.rst Resolved
@isidentical

Copy link
Copy Markdown
Member Author

@serhiy-storchaka any suggestion / thought about the subject?

@furkanonder

Copy link
Copy Markdown
Contributor

LGTM

@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 7, 2026
@serhiy-storchaka serhiy-storchaka changed the title bpo-39902: support equality comparisons in dis.Bytecode gh-84083: support equality comparisons in dis.Bytecode Aug 12, 2026
@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Aug 14, 2026
@ambv
ambv requested a review from AA-Turner as a code owner October 22, 2026 21:27
@bedevere-app bedevere-app Bot added the type-feature A feature request or enhancement label Oct 22, 2026
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35337640 | 📁 Comparing 8296a01 against main (c6661bd)

  🔍 Preview build  

4 files changed
± library/shutil.html
± whatsnew/3.16.html
± whatsnew/3.9.html
± whatsnew/changelog.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants