diff options
author | ravi140222 <100869741+ravi140222@users.noreply.github.com> | 2022-05-12 15:26:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-12 15:26:11 (GMT) |
commit | 079f0dd7191fbadd4c3a5899b6af12492e84d2b4 (patch) | |
tree | a3fffb331db6c4cfc1affa57c3de19ba90eaabf3 /Objects | |
parent | 8a0d9a6bb77a72cd8b9ece01b7c1163fff28029a (diff) | |
download | cpython-079f0dd7191fbadd4c3a5899b6af12492e84d2b4.zip cpython-079f0dd7191fbadd4c3a5899b6af12492e84d2b4.tar.gz cpython-079f0dd7191fbadd4c3a5899b6af12492e84d2b4.tar.bz2 |
gh-91578: improved error message when trying to instantiate an abstract class with missing methods (gh-47246)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/typeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 1bcfd9a..1daf2b8 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -4559,7 +4559,7 @@ object_new(PyTypeObject *type, PyObject *args, PyObject *kwds) PyErr_Format(PyExc_TypeError, "Can't instantiate abstract class %s " - "with abstract method%s %U", + "without an implementation for abstract method%s %U", type->tp_name, method_count > 1 ? "s" : "", joined); |