gh-91578: improved error message when trying to instantiate an abstract class with missing methods (gh-47246)

This commit is contained in:
ravi140222 2022-05-12 20:56:11 +05:30 committed by GitHub
parent 8a0d9a6bb7
commit 079f0dd719
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 8 deletions

View file

@ -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);