]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix dataclass comment typo _eq__ -> __eq__ (GH-26433) (GH-26437)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 29 May 2021 01:07:39 +0000 (18:07 -0700)
committerGitHub <noreply@github.com>
Sat, 29 May 2021 01:07:39 +0000 (21:07 -0400)
(cherry picked from commit 7e6f2375698036d62464c238059ef2073755fdaf)

Co-authored-by: Sean Grady <vedicmonk@gmail.com>
Co-authored-by: Sean Grady <vedicmonk@gmail.com>
Lib/dataclasses.py

index da7cb743b5647304ad4559174537208746317319..c98e74d4ff9cc2b805875073d6e52258256cc758 100644 (file)
@@ -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)