1. mirror
  2. cpython

Commits

bitdancer  committed 1f3ce7b Merge

Merge: #7963: fix error message when 'object' called with arguments.

  • Participants
  • Parent commits aa77f7e, 0e43844
  • Branches default

Comments (0)

Files changed (2)

File Misc/NEWS

View file
 Core and Builtins
 -----------------
 
+- Issue #7963: Fixed misleading error message that issued when object is
+  called without arguments.
+
 - Issue #8745: Small speed up zipimport on Windows. Patch by Catalin Iacob.
 
 - Issue #5308: Raise ValueError when marshalling too large object (a sequence

File Objects/typeobject.c

View file
 {
     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;
     }