[Python-checkins] python/dist/src/Objects complexobject.c,2.58,2.59

gvanrossum@sourceforge.net gvanrossum@sourceforge.net
2002年4月15日 05:39:14 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv11334
Modified Files:
	complexobject.c 
Log Message:
Deprecate % as well. The message for deprecation of //, % and divmod
is the same in all three cases (mostly because // calls divmod :-).
Index: complexobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/complexobject.c,v
retrieving revision 2.58
retrieving revision 2.59
diff -C2 -d -r2.58 -r2.59
*** complexobject.c	15 Apr 2002 01:41:56 -0000	2.58
--- complexobject.c	15 Apr 2002 12:39:12 -0000	2.59
***************
*** 400,403 ****
--- 400,408 ----
 {
 Py_complex div, mod;
+ 
+ 	if (PyErr_Warn(PyExc_DeprecationWarning,
+ 		 "complex divmod(), // and % are deprecated") < 0)
+ 		return NULL;
+ 
 	errno = 0;
 	div = c_quot(v->cval,w->cval); /* The raw divisor value. */
***************
*** 421,425 ****
 
 	if (PyErr_Warn(PyExc_DeprecationWarning,
! 		 "complex divmod() and // are deprecated") < 0)
 		return NULL;
 
--- 426,430 ----
 
 	if (PyErr_Warn(PyExc_DeprecationWarning,
! 		 "complex divmod(), // and % are deprecated") < 0)
 		return NULL;
 

AltStyle によって変換されたページ (->オリジナル) /