Skip to content

bpo-39902: support equality comparisons in dis.Bytecode#18849

Open
isidentical wants to merge 1 commit into
python:mainfrom
isidentical:bpo-39902
Open

bpo-39902: support equality comparisons in dis.Bytecode#18849
isidentical wants to merge 1 commit 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 Outdated
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants