[Python-checkins] python/dist/src/Include enumobject.h,NONE,2.1 Python.h,2.45,2.46

gvanrossum@sourceforge.net gvanrossum@sourceforge.net
Fri, 26 Apr 2002 12:41:00 -0700


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

Modified Files:
	Python.h 
Added Files:
	enumobject.h 
Log Message:
- New builtin function enumerate(x), from PEP 279.  Example:
  enumerate("abc") is an iterator returning (0,"a"), (1,"b"), (2,"c").
  The argument can be an arbitrary iterable object.


--- NEW FILE: enumobject.h ---
#ifndef Py_ENUMOBJECT_H
#define Py_ENUMOBJECT_H

/* Enumerate Object */

#ifdef __cplusplus
extern "C" {
#endif

extern DL_IMPORT(PyTypeObject) PyEnum_Type;

#ifdef __cplusplus
}
#endif

#endif /* !Py_ENUMOBJECT_H */

Index: Python.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v
retrieving revision 2.45
retrieving revision 2.46
diff -C2 -d -r2.45 -r2.46
*** Python.h	3 Apr 2002 22:41:50 -0000	2.45
--- Python.h	26 Apr 2002 19:40:56 -0000	2.46
***************
*** 92,95 ****
--- 92,96 ----
  #include "listobject.h"
  #include "dictobject.h"
+ #include "enumobject.h"
  #include "methodobject.h"
  #include "moduleobject.h"