We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 822bbaa commit 61af25cCopy full SHA for 61af25c
Doc/library/dataclasses.rst
@@ -113,6 +113,10 @@ Module contents
113
(for example, ``self.a == other.a and self.b == other.b``), rather than
114
comparing tuples of fields as in previous versions.
115
116
+ This change makes the comparison faster but it may alter results in cases
117
+ where attributes compare equal by identity but not by value (such as
118
+ ``float('nan')``).
119
+
120
In Python 3.12 and earlier, the comparison was performed by creating
121
tuples of the fields and comparing them (for example,
122
``(self.a, self.b) == (other.a, other.b)``).
0 commit comments