Commits

Anonymous committed 0e43844 Merge

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

  • Participants
  • Parent commits 79ea59b, b5adf2a
  • Branches 3.3

Comments (0)

Files changed (2)

 Core and Builtins
 -----------------
 
+- Issue #7963: Fixed misleading error message that issued when object is
+  called without arguments.
+
 - Issue #5308: Raise ValueError when marshalling too large object (a sequence
   with size >= 2**31), instead of producing illegal marshal data.
 

File Objects/typeobject.c

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