[Python-checkins] python/dist/src/Include graminit.h, 2.20, 2.21 symtable.h, 2.12, 2.13

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Wed May 19 04:20:38 EDT 2004


Update of /cvsroot/python/python/dist/src/Include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9770/Include

Modified Files:
	graminit.h symtable.h 
Log Message:
SF patch #872326:  Generator expression implementation
(Code contributed by Jiwon Seo.)

The documentation portion of the patch is being re-worked and will be
checked-in soon.  Likewise, PEP 289 will be updated to reflect Guido's
rationale for the design decisions on binding behavior (as described in
in his patch comments and in discussions on python-dev).

The test file, test_genexps.py, is written in doctest format and is
meant to exercise all aspects of the the patch.  Further additions are
welcome from everyone.  Please stress test this new feature as much as
possible before the alpha release.



Index: graminit.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/graminit.h,v
retrieving revision 2.20
retrieving revision 2.21
diff -C2 -d -r2.20 -r2.21
*** graminit.h	4 Aug 2002 17:29:52 -0000	2.20
--- graminit.h	19 May 2004 08:20:05 -0000	2.21
***************
*** 50,68 ****
  #define atom 305
  #define listmaker 306
! #define lambdef 307
! #define trailer 308
! #define subscriptlist 309
! #define subscript 310
! #define sliceop 311
! #define exprlist 312
! #define testlist 313
! #define testlist_safe 314
! #define dictmaker 315
! #define classdef 316
! #define arglist 317
! #define argument 318
! #define list_iter 319
! #define list_for 320
! #define list_if 321
! #define testlist1 322
! #define encoding_decl 323
--- 50,72 ----
  #define atom 305
  #define listmaker 306
! #define testlist_gexp 307
! #define lambdef 308
! #define trailer 309
! #define subscriptlist 310
! #define subscript 311
! #define sliceop 312
! #define exprlist 313
! #define testlist 314
! #define testlist_safe 315
! #define dictmaker 316
! #define classdef 317
! #define arglist 318
! #define argument 319
! #define list_iter 320
! #define list_for 321
! #define list_if 322
! #define gen_iter 323
! #define gen_for 324
! #define gen_if 325
! #define testlist1 326
! #define encoding_decl 327

Index: symtable.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/symtable.h,v
retrieving revision 2.12
retrieving revision 2.13
diff -C2 -d -r2.12 -r2.13
*** symtable.h	21 May 2003 17:34:49 -0000	2.12
--- symtable.h	19 May 2004 08:20:05 -0000	2.13
***************
*** 47,51 ****
  	int ste_generator;       /* true if namespace is a generator */
  	int ste_opt_lineno;      /* lineno of last exec or import * */
! 	int ste_tmpname;          /* temporary name counter */
  	struct symtable *ste_table;
  } PySymtableEntryObject;
--- 47,51 ----
  	int ste_generator;       /* true if namespace is a generator */
  	int ste_opt_lineno;      /* lineno of last exec or import * */
! 	int ste_tmpname;         /* temporary name counter */
  	struct symtable *ste_table;
  } PySymtableEntryObject;
***************
*** 94,97 ****
--- 94,100 ----
  #define OPT_BARE_EXEC 4
  
+ #define GENERATOR 1
+ #define GENERATOR_EXPRESSION 2
+ 
  #ifdef __cplusplus
  }




More information about the Python-checkins mailing list