Kaydet (Commit) aaf16b9c authored tarafından R David Murray's avatar R David Murray

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

...@@ -10,6 +10,9 @@ What's New in Python 3.4.0 Alpha 1? ...@@ -10,6 +10,9 @@ What's New in Python 3.4.0 Alpha 1?
Core and Builtins 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 #8745: Small speed up zipimport on Windows. Patch by Catalin Iacob.
- Issue #5308: Raise ValueError when marshalling too large object (a sequence - Issue #5308: Raise ValueError when marshalling too large object (a sequence
......
...@@ -3059,7 +3059,7 @@ object_new(PyTypeObject *type, PyObject *args, PyObject *kwds) ...@@ -3059,7 +3059,7 @@ object_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{ {
if (excess_args(args, kwds) && if (excess_args(args, kwds) &&
(type->tp_init == object_init || type->tp_new != object_new)) { (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; return NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment