mirror of
https://github.com/python/cpython.git
synced 2025-07-30 22:54:16 +00:00
gh-91578: improved error message when trying to instantiate an abstract class with missing methods (gh-47246)
This commit is contained in:
parent
8a0d9a6bb7
commit
079f0dd719
4 changed files with 9 additions and 8 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue