[Python-checkins] CVS: python/dist/src/Objects typeobject.c,2.69,2.70

Guido van Rossum gvanrossum@users.sourceforge.net
Mon, 24 Sep 2001 09:04:01 -0700


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

Modified Files:
	typeobject.c 
Log Message:
Fix the baffler that Tim reported: sometimes the repr() of an object
looks like <X object at ...>, sometimes it says <X instance at ...>.
Make this uniformly say <X object at ...>.


Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.69
retrieving revision 2.70
diff -C2 -d -r2.69 -r2.70
*** typeobject.c	2001/09/21 21:24:49	2.69
--- typeobject.c	2001/09/24 16:03:58	2.70
***************
*** 1158,1167 ****
  		return NULL;
  	if (mod != NULL && strcmp(PyString_AS_STRING(mod), "__builtin__"))
! 		rtn = PyString_FromFormat("<%s.%s instance at %p>",
  					  PyString_AS_STRING(mod),
  					  PyString_AS_STRING(name),
  					  self);
  	else
! 		rtn = PyString_FromFormat("<%s instance at %p>",
  					  type->tp_name, self);
  	Py_XDECREF(mod);
--- 1158,1167 ----
  		return NULL;
  	if (mod != NULL && strcmp(PyString_AS_STRING(mod), "__builtin__"))
! 		rtn = PyString_FromFormat("<%s.%s object at %p>",
  					  PyString_AS_STRING(mod),
  					  PyString_AS_STRING(name),
  					  self);
  	else
! 		rtn = PyString_FromFormat("<%s object at %p>",
  					  type->tp_name, self);
  	Py_XDECREF(mod);