Files
cpython/Include
Victor Stinner f2c1aa1661 Add ast.Constant
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
2016-01-26 00:40:57 +01:00
..
2016-01-26 00:40:57 +01:00
2013-10-05 16:28:04 -04:00
2010-12-03 20:14:31 +00:00
2010-12-03 20:14:31 +00:00
2010-12-03 20:14:31 +00:00
2015-03-21 09:25:53 +02:00
2015-01-29 14:29:51 +01:00
2015-03-21 09:25:53 +02:00
2014-10-10 11:55:41 +02:00
2010-12-03 20:14:31 +00:00
2011-03-16 11:35:38 +02:00
2016-01-20 11:12:38 +01:00
2010-12-03 20:14:31 +00:00
2016-01-26 00:40:57 +01:00