Skip to content

Commit d5b657b

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

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
@@ -944,7 +944,7 @@ def _process_class(cls, init, repr, eq, order, unsafe_hash, frozen):
944944
_set_new_attribute(cls, '__repr__', _repr_fn(flds, globals))
945945

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

0 commit comments

Comments
 (0)