[Python-checkins] CVS: python/dist/src/Python ceval.c,2.238.2.1,2.238.2.2

Thomas Wouters twouters@users.sourceforge.net
Wed, 27 Jun 2001 07:13:35 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv1989/Python

Modified Files:
      Tag: release21-maint
	ceval.c 
Log Message:

Backport Tim's checkin 2.247:

SF bug 433228:  repr(list) woes when len(list) big
call_object:  If the object isn't callable, display its type in the error
msg rather than its repr.



Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.238.2.1
retrieving revision 2.238.2.2
diff -C2 -r2.238.2.1 -r2.238.2.2
*** ceval.c	2001/06/27 13:09:44	2.238.2.1
--- ceval.c	2001/06/27 14:13:32	2.238.2.2
***************
*** 2813,2818 ****
  		result = (*call)(func, arg, kw);
  	else {
! 		PyErr_Format(PyExc_TypeError, "object is not callable: %s",
! 			     PyString_AS_STRING(PyObject_Repr(func)));
  		return NULL;
  	}
--- 2813,2819 ----
  		result = (*call)(func, arg, kw);
  	else {
! 		PyErr_Format(PyExc_TypeError,
! 			     "object of type '%.100s' is not callable",
! 			     func->ob_type->tp_name);
  		return NULL;
  	}