[Python-checkins] python/dist/src/Objects abstract.c,2.93.6.7,2.93.6.8

rhettinger@users.sourceforge.net rhettinger@users.sourceforge.net
Sat, 05 Oct 2002 14:14:14 -0700


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

Modified Files:
      Tag: release22-maint
	abstract.c 
Log Message:
Backport 2.103:  

Made conversion failure error messages consistent between types.



Index: abstract.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/abstract.c,v
retrieving revision 2.93.6.7
retrieving revision 2.93.6.8
diff -C2 -d -r2.93.6.7 -r2.93.6.8
*** abstract.c	24 Sep 2002 11:11:12 -0000	2.93.6.7
--- abstract.c	5 Oct 2002 21:14:12 -0000	2.93.6.8
***************
*** 904,908 ****
  		return int_from_string((char*)buffer, buffer_len);
  
! 	return type_error("object can't be converted to int");
  }
  
--- 904,908 ----
  		return int_from_string((char*)buffer, buffer_len);
  
! 	return type_error("int() argument must be a string or a number");
  }
  
***************
*** 961,965 ****
  		return long_from_string(buffer, buffer_len);
  
! 	return type_error("object can't be converted to long");
  }
  
--- 961,965 ----
  		return long_from_string(buffer, buffer_len);
  
! 	return type_error("long() argument must be a string or a number");
  }