Skip to content

Conversation

@isidentical
Copy link
Member

@isidentical isidentical commented Mar 8, 2020

Lib/dis.py Outdated
Copy link
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

@isidentical
Copy link
Member Author

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

@furkanonder
Copy link
Contributor

LGTM

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants