mirror of
https://github.com/python/cpython.git
synced 2025-07-23 19:25:40 +00:00
Preliminary support for "from __future__ import generators" to enable
the yield statement. I figure we have to have this in before I can release 2.2a1 on Wednesday. Note: test_generators is currently broken, I'm counting on Tim to fix this.
This commit is contained in:
parent
045ca7ae72
commit
b09f7ed623
8 changed files with 47 additions and 3 deletions
|
@ -65,6 +65,9 @@ DL_IMPORT(PyCodeObject *) PyNode_CompileFlags(struct _node *, char *,
|
|||
#define NESTED_SCOPES_DEFAULT 1
|
||||
#define FUTURE_NESTED_SCOPES "nested_scopes"
|
||||
|
||||
#define GENERATORS_DEFAULT 0
|
||||
#define FUTURE_GENERATORS "generators"
|
||||
|
||||
/* for internal use only */
|
||||
#define _PyCode_GETCODEPTR(co, pp) \
|
||||
((*(co)->co_code->ob_type->tp_as_buffer->bf_getreadbuffer) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue