Skip to content

Commit 1d02dd7

Browse files
committed
move versionchanged block after 'ignored' sentence
1 parent 7b092a6 commit 1d02dd7

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎Doc/library/dataclasses.rst‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,20 +108,20 @@ Module contents
108108
This method compares the class by comparing each field in order. Both
109109
instances in the comparison must be of the identical type.
110110

111+
If the class already defines :meth:`!__eq__`, this parameter is ignored.
112+
111113
.. versionchanged:: 3.13
112114
The generated ``__eq__`` method now compares each field individually
113115
(for example, ``self.a == other.a and self.b == other.b``), rather than
114116
comparing tuples of fields as in previous versions.
115117

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')``).
118+
This change makes the comparison faster but it may alter results in cases
119+
where attributes compare equal by identity but not by value (such as
120+
``float('nan')``).
119121

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)``).
123-
124-
If the class already defines :meth:`!__eq__`, this parameter is ignored.
122+
In Python 3.12 and earlier, the comparison was performed by creating
123+
tuples of the fields and comparing them (for example,
124+
``(self.a, self.b) == (other.a, other.b)``).
125125

126126
- *order*: If true (the default is ``False``), :meth:`~object.__lt__`,
127127
:meth:`~object.__le__`, :meth:`~object.__gt__`, and :meth:`~object.__ge__` methods will be

0 commit comments

Comments
 (0)