summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-05-06 19:29:40 (GMT)
committerGitHub <noreply@github.com>2019-05-06 19:29:40 (GMT)
commit96aeaec64738b730c719562125070a52ed570210 (patch)
treed68994f93014d081e9a441e7bf7dfda3aaadd402 /Objects
parent964663089547ca110199e23867b46b07ff4be88c (diff)
downloadcpython-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 'Objects')
-rw-r--r--Objects/boolobject.c2
-rw-r--r--Objects/complexobject.c2
-rw-r--r--Objects/floatobject.c2
-rw-r--r--Objects/longobject.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/Objects/boolobject.c b/Objects/boolobject.c
index b92fafe..508ea61 100644
--- a/Objects/boolobject.c
+++ b/Objects/boolobject.c
@@ -147,7 +147,7 @@ PyTypeObject PyBool_Type = {
0, /* tp_as_mapping */
0, /* tp_hash */
0, /* tp_call */
- bool_repr, /* tp_str */
+ 0, /* tp_str */
0, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index 6e3d47b..cae2bf1 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -1129,7 +1129,7 @@ PyTypeObject PyComplex_Type = {
0, /* tp_as_mapping */
(hashfunc)complex_hash, /* tp_hash */
0, /* tp_call */
- (reprfunc)complex_repr, /* tp_str */
+ 0, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index b952df8..adb9b80 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -1923,7 +1923,7 @@ PyTypeObject PyFloat_Type = {
0, /* tp_as_mapping */
(hashfunc)float_hash, /* tp_hash */
0, /* tp_call */
- (reprfunc)float_repr, /* tp_str */
+ 0, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
diff --git a/Objects/longobject.c b/Objects/longobject.c
index da697a7..9fb1fb0 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -5592,7 +5592,7 @@ PyTypeObject PyLong_Type = {
0, /* tp_as_mapping */
(hashfunc)long_hash, /* tp_hash */
0, /* tp_call */
- long_to_decimal_string, /* tp_str */
+ 0, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */