Skip to content

Commit 1757ddd

Browse files
Fix dataclass comment typo _eq__ -> __eq__ (GH-26433) (GH-26436)
(cherry picked from commit 7e6f237) Co-authored-by: Sean Grady <[email protected]> Co-authored-by: Sean Grady <[email protected]>
1 parent a7aa105 commit 1757ddd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/dataclasses.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ def _process_class(cls, init, repr, eq, order, unsafe_hash, frozen,
10381038
_set_new_attribute(cls, '__repr__', _repr_fn(flds, globals))
10391039

10401040
if eq:
1041-
# Create _eq__ method. There's no need for a __ne__ method,
1041+
# Create __eq__ method. There's no need for a __ne__ method,
10421042
# since python will call __eq__ and negate it.
10431043
flds = [f for f in field_list if f.compare]
10441044
self_tuple = _tuple_str('self', flds)

0 commit comments

Comments
 (0)