bpo-36793: Remove unneeded __str__ definitions. (GH-13081)
Classes that define __str__ the same as __repr__ can
just inherit it from object.
diff --git a/Lib/email/charset.py b/Lib/email/charset.py
index ee56404..d3d759a 100644
--- a/Lib/email/charset.py
+++ b/Lib/email/charset.py
@@ -241,11 +241,9 @@
self.output_codec = CODEC_MAP.get(self.output_charset,
self.output_charset)
- def __str__(self):
+ def __repr__(self):
return self.input_charset.lower()
- __repr__ = __str__
-
def __eq__(self, other):
return str(self) == str(other).lower()