[Python-checkins] python/dist/src/Python compile.c,2.284,2.285

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
2003年5月12日 12:16:55 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv2959/Python
Modified Files:
	compile.c 
Log Message:
cmp_type(): The grammar stopped allowing '=' as a comparison operator
about a decade ago. Put the code still allowing for it in cmp_type()
out of its lonely misery.
Index: compile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v
retrieving revision 2.284
retrieving revision 2.285
diff -C2 -d -r2.284 -r2.285
*** compile.c	10 May 2003 07:36:56 -0000	2.284
--- compile.c	12 May 2003 19:16:52 -0000	2.285
***************
*** 2369,2373 ****
 {
 	REQ(n, comp_op);
! 	/* comp_op: '<' | '>' | '=' | '>=' | '<=' | '<>' | '!=' | '=='
 	 | 'in' | 'not' 'in' | 'is' | 'is' not' */
 	if (NCH(n) == 1) {
--- 2369,2373 ----
 {
 	REQ(n, comp_op);
! 	/* comp_op: '<' | '>' | '>=' | '<=' | '<>' | '!=' | '=='
 	 | 'in' | 'not' 'in' | 'is' | 'is' not' */
 	if (NCH(n) == 1) {
***************
*** 2376,2381 ****
 		case LESS:	return PyCmp_LT;
 		case GREATER:	return PyCmp_GT;
! 		case EQEQUAL:			/* == */
! 		case EQUAL:	return PyCmp_EQ;
 		case LESSEQUAL:	return PyCmp_LE;
 		case GREATEREQUAL: return PyCmp_GE;
--- 2376,2380 ----
 		case LESS:	return PyCmp_LT;
 		case GREATER:	return PyCmp_GT;
! 		case EQEQUAL:	return PyCmp_EQ;
 		case LESSEQUAL:	return PyCmp_LE;
 		case GREATEREQUAL: return PyCmp_GE;

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