mirror of
https://github.com/python/cpython.git
synced 2025-07-19 17:25:54 +00:00

Fix list comp code generation -- emit GET_ITER instead of Const(0) after the list. Add CO_GENERATOR flag to generators. Get CO_xxx flags from the new module
13 lines
267 B
Python
13 lines
267 B
Python
from new import * # import all the CO_xxx flags
|
|
del classobj, code, function, instance, instancemethod, module
|
|
|
|
# operation flags
|
|
OP_ASSIGN = 'OP_ASSIGN'
|
|
OP_DELETE = 'OP_DELETE'
|
|
OP_APPLY = 'OP_APPLY'
|
|
|
|
SC_LOCAL = 1
|
|
SC_GLOBAL = 2
|
|
SC_FREE = 3
|
|
SC_CELL = 4
|
|
SC_UNKNOWN = 5
|