cpython/Python
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
..
clinic Rebuilt Clinic generated code. 2015-08-24 20:23:27 -07:00
Python-ast.c Add ast.Constant 2016-01-26 00:40:57 +01:00
README Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00
_warnings.c Issue #25923: Added more const qualifiers to signatures of static and private functions. 2015-12-25 20:01:53 +02:00
asdl.c Issue #22207: Fix "comparison between signed and unsigned integers" warning in 2014-08-17 22:20:00 +02:00
ast.c Add ast.Constant 2016-01-26 00:40:57 +01:00
bltinmodule.c Issue #24802: Merge null termination fixes from 3.5 2015-11-07 03:15:32 +00:00
ceval.c Issue #20440: Applied yet one patch for using Py_SETREF. 2015-12-27 12:38:28 +02:00
ceval_gil.h Use Py_uintptr_t for atomic pointers 2016-01-22 14:09:55 +01:00
codecs.c Issue #24993: Handle import error in namereplace error handler 2015-09-03 16:19:40 +02:00
compile.c Add ast.Constant 2016-01-26 00:40:57 +01:00
condvar.h Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
dtoa.c Issue #25923: Added more const qualifiers to signatures of static and private functions. 2015-12-25 20:01:53 +02:00
dup2.c Merged revisions 85236 via svnmerge from 2010-10-05 22:18:29 +00:00
dynamic_annotations.c Make (most of) Python's tests pass under Thread Sanitizer. 2010-05-03 19:29:34 +00:00
dynload_aix.c PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
dynload_dl.c Issue #24268: Fix import naming when loading extension modules. Patch by Petr Viktorin. 2015-05-23 14:13:41 -07:00
dynload_hpux.c Issue #24268: Fix import naming when loading extension modules. Patch by Petr Viktorin. 2015-05-23 14:13:41 -07:00
dynload_next.c Issue #24268: Fix import naming when loading extension modules. Patch by Petr Viktorin. 2015-05-23 14:13:41 -07:00
dynload_shlib.c PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
dynload_stub.c Issue #13959: Re-implement imp.get_suffixes() in Lib/imp.py. 2012-05-04 15:20:40 -04:00
dynload_win.c Issue #25923: Added more const qualifiers to signatures of static and private functions. 2015-12-25 20:01:53 +02:00
errors.c Add _PyThreadState_UncheckedGet() 2016-01-20 11:12:38 +01:00
fileutils.c Fix a couple of typos in code comments 2015-12-17 10:18:28 +00:00
formatter_unicode.c Issue #25923: Added the const qualifier to static constant arrays. 2015-12-25 19:53:18 +02:00
frozen.c Issue #23911: Move path-based bootstrap code to a separate frozen module. 2015-05-02 19:15:18 -06:00
frozenmain.c Issue #5319: New Py_FinalizeEx() API to exit with status 120 on failure 2015-11-30 03:18:29 +00:00
future.c Add ast.Constant 2016-01-26 00:40:57 +01:00
getargs.c Issue #25923: Added more const qualifiers to signatures of static and private functions. 2015-12-25 20:01:53 +02:00
getcompiler.c
getcopyright.c 2016 will be another year of writing copyrighted code 2016-01-01 10:23:45 -06:00
getopt.c #16306: report only the first unknown option and add more tests. Patch by Serhiy Storchaka. 2012-11-23 18:48:32 +02:00
getplatform.c
getversion.c Merged revisions 83352,83355-83358,83362,83366,83368-83369 via svnmerge from 2010-08-01 19:17:57 +00:00
graminit.c Issue #9232: Support trailing commas in function declarations. 2015-08-12 08:00:06 +12:00
import.c Issue #18018: Raise an ImportError if a relative import is attempted 2016-01-22 16:39:02 -08:00
importdl.c Issue #25923: Added the const qualifier to static constant arrays. 2015-12-25 19:53:18 +02:00
importdl.h PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
importlib.h Issue #25791: Warn when __package__ != __spec__.parent. 2016-01-22 15:25:50 -08:00
importlib_external.h co_lnotab supports negative line number delta 2016-01-20 12:16:21 +01:00
makeopcodetargets.py excise the remains of STOP_CODE, which hasn't done anything useful for years 2011-07-17 22:49:50 -05:00
marshal.c Issue #26146: marshal.loads() now uses the empty frozenset singleton 2016-01-23 14:15:48 +01:00
modsupport.c Issue #25923: Added more const qualifiers to signatures of static and private functions. 2015-12-25 20:01:53 +02:00
mysnprintf.c Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
mystrtoul.c Issue #25923: Added the const qualifier to static constant arrays. 2015-12-25 19:53:18 +02:00
opcode_targets.h Issue 25483: Add an opcode to make f-string formatting more robust. 2015-11-03 12:45:05 -05:00
peephole.c co_lnotab supports negative line number delta 2016-01-20 12:16:21 +01:00
pyarena.c Issue #18203: Replace malloc() with PyMem_Malloc() to allocate arena objects 2013-07-07 17:18:53 +02:00
pyctype.c Include files missed in r72044. 2009-04-27 20:54:42 +00:00
pyfpe.c Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
pyhash.c Issue #20162: Fix an alignment issue in the siphash24() hash function which 2014-02-01 03:38:56 +01:00
pylifecycle.c Fix indentation of continuation lines. 2016-01-18 08:00:15 +01:00
pymath.c Issue 24366: Indent code (thanks to li4ick for reporting). 2015-06-02 18:53:46 -04:00
pystate.c Use Py_uintptr_t for atomic pointers 2016-01-22 14:09:55 +01:00
pystrcmp.c Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
pystrhex.c Silence a gcc "may be used uninitialized" compiler warning. Not true. 2015-04-25 23:51:39 -07:00
pystrtod.c Issue #25923: Added the const qualifier to static constant arrays. 2015-12-25 19:53:18 +02:00
pythonrun.c Issue #25923: Added more const qualifiers to signatures of static and private functions. 2015-12-25 20:01:53 +02:00
pytime.c Merge 3.5 (pytime) 2015-11-10 12:11:52 +01:00
random.c Issue #25558: Use compile-time asserts. 2015-11-07 15:42:38 +02:00
sigcheck.c
strdup.c Issue #18722: Remove uses of the "register" keyword in C code. 2013-08-13 20:18:52 +02:00
structmember.c Fix null pointer dereferencing in structmember.c PyMember_SetOne() for T_CHAR. _PyUnicode_AsStringAndSize() can return NULL without touching the len argument. Also remove unnecessary PyUnicode_Check(), _PyUnicode_AsStringAndSize() performance the test again. CID 486815 2012-09-11 17:30:53 +02:00
symtable.c Add ast.Constant 2016-01-26 00:40:57 +01:00
sysmodule.c Merge 3.5 2016-01-20 11:19:46 +01:00
thread.c Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5 2015-11-02 04:04:57 +00:00
thread_foobar.h Issue #21312: Update the thread_foobar.h template file to include newer threading APIs. Patch by Jack McCracken. 2014-04-28 21:12:11 +02:00
thread_nt.h Merging from 3.3: The PyCOND_TIMEDWAIT must use microseconds for the timeout argument 2014-05-08 10:59:52 +00:00
thread_pthread.h Issue #22206: Using pthread, PyThread_create_key() now sets errno to ENOMEM and 2014-08-17 22:11:06 +02:00
traceback.c Issue #24436: Added const qualifiers for char* arguments of _PyTraceback_Add. 2015-06-21 16:00:33 +03:00

README

Miscellaneous source files for the main Python shared library