-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
Open
Labels
Description
The existing documentation says "This method compares the class as if it were a tuple of its fields, in order."
However, in 3.13 the behavior was changed to compare a field at a time, such as self.a == other.a and self.b == other.b
, instead of the older (self.a, self.b) == (other.a, other.b)
.
Any change should include a version changed notice, and a description of the 3.12 and earlier behavior, which was indeed to create a tuple of fields and compare tuples.
And if we're going to document this, we should add a test about it. Specifically, see #120645 and #128294 for examples.
Linked PRs
Metadata
Metadata
Assignees
Labels
Projects
Status
Todo