8000 Fix dataclass comment typo _eq__ -> __eq__ (GH-26433) · python/cpython@7e6f237 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7e6f237

Browse files
authored
Fix dataclass comment typo _eq__ -> __eq__ (GH-26433)
1 parent 2138b2e commit 7e6f237

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)
0