compiled *by* a code object knows whether to allow yield stmts. In
effect, this passes on the "from __future__ import generators" state
in effect when the code block was compiled. */
-#define CO_GENERATOR_ALLOWED 0x1000
+#define CO_GENERATOR_ALLOWED 0x1000 /* no longer used in an essential way */
#define CO_FUTURE_DIVISION 0x2000
extern DL_IMPORT(PyTypeObject) PyCode_Type;
extern "C" {
#endif
-#define PyCF_MASK (CO_GENERATOR_ALLOWED | CO_FUTURE_DIVISION)
-#define PyCF_MASK_OBSOLETE (CO_NESTED)
+#define PyCF_MASK (CO_FUTURE_DIVISION)
+#define PyCF_MASK_OBSOLETE (CO_GENERATOR_ALLOWED | CO_NESTED)
typedef struct {
int cf_flags; /* bitmask of CO_xxx flags relevant to future */
if (strcmp(feature, FUTURE_NESTED_SCOPES) == 0) {
continue;
} else if (strcmp(feature, FUTURE_GENERATORS) == 0) {
- ff->ff_features |= CO_GENERATOR_ALLOWED;
+ continue;
} else if (strcmp(feature, FUTURE_DIVISION) == 0) {
ff->ff_features |= CO_FUTURE_DIVISION;
} else if (strcmp(feature, "braces") == 0) {