mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Add support for absolute/relative imports and if/else expressions:
- regenerate ast.py - add future flags for absolute-import and with-statement so they (hopefully) properly get set in code-object flags - try out if/else expressions in actual code for the hell of it. Seems to generate the same kind of bytecode as the normal compiler.
This commit is contained in:
parent
7e2ac2533e
commit
fa0cf4f3ae
5 changed files with 82 additions and 19 deletions
|
@ -771,7 +771,7 @@ class StackDepthTracker:
|
|||
'COMPARE_OP': -1,
|
||||
'STORE_FAST': -1,
|
||||
'IMPORT_STAR': -1,
|
||||
'IMPORT_NAME': 0,
|
||||
'IMPORT_NAME': -1,
|
||||
'IMPORT_FROM': 1,
|
||||
'LOAD_ATTR': 0, # unlike other loads
|
||||
# close enough...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue