Summary
PLR0124 documentation states:
Comparing a name to itself always results in the same value (...)
Bu it doesn't, as one can overload __eq__.
This came up in a situation where I had an assertion like:
I wrote the test because foo's class had overriden eq and I needed to test that the equality still held.
I suggest to rewrite the first sentence, switching "always" to "likely" and adjusting the rest accordingly:
Comparing a name to itself likely results in a truthy value, and is probably a mistake.
Version
N/A
Summary
PLR0124 documentation states:
Bu it doesn't, as one can overload
__eq__.This came up in a situation where I had an assertion like:
I wrote the test because foo's class had overriden eq and I needed to test that the equality still held.
I suggest to rewrite the first sentence, switching "always" to "likely" and adjusting the rest accordingly:
Version
N/A