[Python-checkins] Fix dataclass comment typo _eq__ -> __eq__ (GH-26433)
ericvsmith
webhook-mailer at python.org
Fri May 28 16:57:26 EDT 2021
https://github.com/python/cpython/commit/7e6f2375698036d62464c238059ef2073755fdaf
commit: 7e6f2375698036d62464c238059ef2073755fdaf
branch: main
author: Sean Grady <vedicmonk at gmail.com>
committer: ericvsmith <ericvsmith at users.noreply.github.com>
date: 2021年05月28日T16:57:18-04:00
summary:
Fix dataclass comment typo _eq__ -> __eq__ (GH-26433)
files:
M Lib/dataclasses.py
diff --git a/Lib/dataclasses.py b/Lib/dataclasses.py
index cbba320e01a54d..79739976d3d29b 100644
--- a/Lib/dataclasses.py
+++ b/Lib/dataclasses.py
@@ -1038,7 +1038,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)
More information about the Python-checkins
mailing list