mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
#7963: fix error message when 'object' called with arguments.
This commit is contained in:
commit
702a5dc1ed
2 changed files with 4 additions and 1 deletions
|
@ -3059,7 +3059,7 @@ object_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
{
|
||||
if (excess_args(args, kwds) &&
|
||||
(type->tp_init == object_init || type->tp_new != object_new)) {
|
||||
PyErr_SetString(PyExc_TypeError, "object.__new__() takes no parameters");
|
||||
PyErr_SetString(PyExc_TypeError, "object() takes no parameters");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue