| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
@carljm Did you mean to close this? Just seen your comment on the issue. |
Sorry, something went wrong.
|
@markshannon I did close it intentionally because I become unconvinced we should merge it. But I'm happy to reopen it if we reach a different conclusion. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This removes the complex, finicky, and unnecessary hash and comparison methods of code objects. As code objects change, these methods regularly become out of date and have to be updated to account for new fields. And as code objects have become more mutable with the specializing interpreter, it makes less sense to treat them as value types.
After this PR, code objects are hashed/equal solely by identity (the default behavior of Python objects), which is faster and simpler.
Given that "naturally occurring" code objects are in practice never equal to each other by the old rules anyway, this only impacts such artificial cases as code == code.replace() (which was previously true and is no longer true with this PR.)
Closes #101346.