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

This commit is contained in:
R David Murray 2013-02-18 21:44:03 -05:00
commit aaf16b9cfb
2 changed files with 4 additions and 1 deletions

View file

@ -10,6 +10,9 @@ What's New in Python 3.4.0 Alpha 1?
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

View file

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