diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2019-05-06 19:29:40 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-06 19:29:40 (GMT) |
commit | 96aeaec64738b730c719562125070a52ed570210 (patch) | |
tree | d68994f93014d081e9a441e7bf7dfda3aaadd402 /Lib/logging | |
parent | 964663089547ca110199e23867b46b07ff4be88c (diff) | |
download | cpython-96aeaec64738b730c719562125070a52ed570210.zip cpython-96aeaec64738b730c719562125070a52ed570210.tar.gz cpython-96aeaec64738b730c719562125070a52ed570210.tar.bz2 |
bpo-36793: Remove unneeded __str__ definitions. (GH-13081)
Classes that define __str__ the same as __repr__ can
just inherit it from object.
Diffstat (limited to 'Lib/logging')
-rw-r--r-- | Lib/logging/__init__.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 7355396..e093982 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -364,12 +364,10 @@ class LogRecord(object): else: self.process = None - def __str__(self): + def __repr__(self): return '<LogRecord: %s, %s, %s, %s, "%s">'%(self.name, self.levelno, self.pathname, self.lineno, self.msg) - __repr__ = __str__ - def getMessage(self): """ Return the message for this LogRecord. |