Fix dataclass comment typo _eq__ -> __eq__ (GH-26433) (GH-26437)
https://github.com/python/cpython/commit/d5b657b9645c33d188e6bd9a83a835f7b8c... commit: d5b657b9645c33d188e6bd9a83a835f7b8c5915a branch: 3.9 author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> committer: ericvsmith <ericvsmith@users.noreply.github.com> date: 2021-05-28T21:07:39-04:00 summary: Fix dataclass comment typo _eq__ -> __eq__ (GH-26433) (GH-26437) (cherry picked from commit 7e6f2375698036d62464c238059ef2073755fdaf) Co-authored-by: Sean Grady <vedicmonk@gmail.com> Co-authored-by: Sean Grady <vedicmonk@gmail.com> files: M Lib/dataclasses.py diff --git a/Lib/dataclasses.py b/Lib/dataclasses.py index da7cb743b56473..c98e74d4ff9cc2 100644 --- a/Lib/dataclasses.py +++ b/Lib/dataclasses.py @@ -944,7 +944,7 @@ def _process_class(cls, init, repr, eq, order, unsafe_hash, frozen): _set_new_attribute(cls, '__repr__', _repr_fn(flds, globals)) if eq: - # Create _eq__ method. There's no need for a __ne__ method, + # Create __eq__ method. There's no need for a __ne__ method, # since python will call __eq__ and negate it. flds = [f for f in field_list if f.compare] self_tuple = _tuple_str('self', flds)
participants (1)
-
ericvsmith