
python-checkins at python
May 1, 2012, 7:16 AM
Post #1 of 1
(23 views)
Permalink
|
|
cpython (2.7): use formats that work on 2.7
|
|
http://hg.python.org/cpython/rev/6ff4440b5fa2 changeset: 76699:6ff4440b5fa2 branch: 2.7 user: Benjamin Peterson <benjamin [at] python> date: Tue May 01 10:16:33 2012 -0400 summary: use formats that work on 2.7 files: Objects/descrobject.c | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Objects/descrobject.c b/Objects/descrobject.c --- a/Objects/descrobject.c +++ b/Objects/descrobject.c @@ -262,28 +262,27 @@ argc = PyTuple_GET_SIZE(args); if (argc < 1) { PyErr_Format(PyExc_TypeError, - "descriptor '%V' of '%.100s' " + "descriptor '%s' of '%.100s' " "object needs an argument", - descr_name((PyDescrObject *)descr), "?", + descr_name((PyDescrObject *)descr), descr->d_type->tp_name); return NULL; } self = PyTuple_GET_ITEM(args, 0); if (!PyType_Check(self)) { PyErr_Format(PyExc_TypeError, - "descriptor '%V' requires a type " + "descriptor '%s' requires a type " "but received a '%.100s'", - descr_name((PyDescrObject *)descr), "?", - descr->d_type->tp_name, + descr_name((PyDescrObject *)descr), self->ob_type->tp_name); return NULL; } if (!PyType_IsSubtype((PyTypeObject *)self, descr->d_type)) { PyErr_Format(PyExc_TypeError, - "descriptor '%V' " + "descriptor '%s' " "requires a subtype of '%.100s' " "but received '%.100s", - descr_name((PyDescrObject *)descr), "?", + descr_name((PyDescrObject *)descr), descr->d_type->tp_name, self->ob_type->tp_name); return NULL; -- Repository URL: http://hg.python.org/cpython
|