• Victor Stinner's avatar
    Add ast.Constant · f2c1aa16
    Victor Stinner yazdı
    Issue #26146: Add a new kind of AST node: ast.Constant. It can be used by
    external AST optimizers, but the compiler does not emit directly such node.
    
    An optimizer can replace the following AST nodes with ast.Constant:
    
    * ast.NameConstant: None, False, True
    * ast.Num: int, float, complex
    * ast.Str: str
    * ast.Bytes: bytes
    * ast.Tuple if items are constants too: tuple
    * frozenset
    
    Update code to accept ast.Constant instead of ast.Num and/or ast.Str:
    
    * compiler
    * docstrings
    * ast.literal_eval()
    * Tools/parser/unparse.py
    f2c1aa16
Adı
Son kayıt (commit)
Son güncelleme
..
Python.asdl Loading commit data...
acceler.c Loading commit data...
asdl.py Loading commit data...
asdl_c.py Loading commit data...
bitset.c Loading commit data...
firstsets.c Loading commit data...
grammar.c Loading commit data...
grammar1.c Loading commit data...
listnode.c Loading commit data...
metagrammar.c Loading commit data...
myreadline.c Loading commit data...
node.c Loading commit data...
parser.c Loading commit data...
parser.h Loading commit data...
parsetok.c Loading commit data...
parsetok_pgen.c Loading commit data...
pgen.c Loading commit data...
pgenmain.c Loading commit data...
printgrammar.c Loading commit data...
tokenizer.c Loading commit data...
tokenizer.h Loading commit data...
tokenizer_pgen.c Loading commit data...