[Python-checkins] cpython (merge 3.2 -> 3.3): #7963: fix error message when 'object' called with arguments.
r.david.murray
python-checkins at python.org
Tue Feb 19 03:44:40 CET 2013
http://hg.python.org/cpython/rev/0e438442fddf
changeset: 82260:0e438442fddf
branch: 3.3
parent: 82257:79ea59b394bf
parent: 82259:b5adf2a30b73
user: R David Murray <rdmurray at bitdance.com>
date: Mon Feb 18 21:39:18 2013 -0500
summary:
#7963: fix error message when 'object' called with arguments.
files:
Misc/NEWS | 3 +++
Objects/typeobject.c | 2 +-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,9 @@
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.
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -3059,7 +3059,7 @@
{
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;
}
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list