[Python-checkins] CVS: python/dist/src/Python ceval.c,2.246,2.247

Tim Peters tim_one@users.sourceforge.net
Fri, 15 Jun 2001 17:09:30 -0700


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

Modified Files:
	ceval.c 
Log Message:
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.
Bugfix candidate.


Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.246
retrieving revision 2.247
diff -C2 -r2.246 -r2.247
*** ceval.c	2001/06/08 04:33:09	2.246
--- ceval.c	2001/06/16 00:09:28	2.247
***************
*** 2863,2868 ****
  		result = (*call)(func, arg, kw);
  	else {
! 		PyErr_Format(PyExc_TypeError, "object is not callable: %s",
! 			     PyString_AS_STRING(PyObject_Repr(func)));
  		return NULL;
  	}
--- 2863,2869 ----
  		result = (*call)(func, arg, kw);
  	else {
! 		PyErr_Format(PyExc_TypeError,
! 			     "object of type '%.100s' is not callable",
! 			     func->ob_type->tp_name);
  		return NULL;
  	}