[Python-checkins] python/dist/src/Python bltinmodule.c,2.290,2.291

aleax@users.sourceforge.net aleax@users.sourceforge.net
Wed, 23 Apr 2003 06:00:49 -0700


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

Modified Files:
	bltinmodule.c 
Log Message:
complete and clarify some error messages for range()


Index: bltinmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v
retrieving revision 2.290
retrieving revision 2.291
diff -C2 -d -r2.290 -r2.291
*** bltinmodule.c	22 Apr 2003 09:24:48 -0000	2.290
--- bltinmodule.c	23 Apr 2003 13:00:44 -0000	2.291
***************
*** 1369,1373 ****
  	if (!PyInt_Check(ilow) && !PyLong_Check(ilow)) {
  		PyErr_Format(PyExc_TypeError,
! 			     "integer start argument expected, got %s.",
  			     ilow->ob_type->tp_name);
  		goto Fail;
--- 1369,1373 ----
  	if (!PyInt_Check(ilow) && !PyLong_Check(ilow)) {
  		PyErr_Format(PyExc_TypeError,
! 			     "range() integer start argument expected, got %s.",
  			     ilow->ob_type->tp_name);
  		goto Fail;
***************
*** 1376,1380 ****
  	if (!PyInt_Check(ihigh) && !PyLong_Check(ihigh)) {
  		PyErr_Format(PyExc_TypeError,
! 			     "integer end argument expected, got %s.",
  			     ihigh->ob_type->tp_name);
  		goto Fail;
--- 1376,1380 ----
  	if (!PyInt_Check(ihigh) && !PyLong_Check(ihigh)) {
  		PyErr_Format(PyExc_TypeError,
! 			     "range() integer end argument expected, got %s.",
  			     ihigh->ob_type->tp_name);
  		goto Fail;
***************
*** 1383,1387 ****
  	if (!PyInt_Check(istep) && !PyLong_Check(istep)) {
  		PyErr_Format(PyExc_TypeError,
! 			     "integer step argument expected, got %s.",
  			     istep->ob_type->tp_name);
  		goto Fail;
--- 1383,1387 ----
  	if (!PyInt_Check(istep) && !PyLong_Check(istep)) {
  		PyErr_Format(PyExc_TypeError,
! 			     "range() integer step argument expected, got %s.",
  			     istep->ob_type->tp_name);
  		goto Fail;
***************
*** 1392,1396 ****
  	if (cmp_result == 0) {
  		PyErr_SetString(PyExc_ValueError,
! 				"range() arg 3 must not be zero");
  		goto Fail;
  	}
--- 1392,1396 ----
  	if (cmp_result == 0) {
  		PyErr_SetString(PyExc_ValueError,
! 				"range() step argument must not be zero");
  		goto Fail;
  	}
***************
*** 1508,1512 ****
  	if (istep == 0) {
  		PyErr_SetString(PyExc_ValueError,
! 				"range() arg 3 must not be zero");
  		return NULL;
  	}
--- 1508,1512 ----
  	if (istep == 0) {
  		PyErr_SetString(PyExc_ValueError,
! 				"range() step argument must not be zero");
  		return NULL;
  	}