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
..
abstract.h issue25909 - Correct the documentation of PyMapping_Items, PyMapping_Keys and 2016-01-21 09:37:28 -08:00
accu.h Issue #14387 : undefine 'small' so that it doesn't clash with Windows headers. 2012-03-22 23:10:37 +00:00
asdl.h Add ast.Constant 2016-01-26 00:40:57 +01:00
ast.h Close #11619: The parser and the import machinery do not encode Unicode 2013-08-26 22:28:21 +02:00
bitset.h
bltinmodule.h these builtins have to be initialized 2009-05-09 18:10:51 +00:00
boolobject.h
bytearrayobject.h fix comment 2013-10-05 16:28:04 -04:00
bytes_methods.h Issue #25923: Added more const qualifiers to signatures of static and private functions. 2015-12-25 20:01:53 +02:00
bytesobject.h Add _PyBytesWriter_Resize() function 2015-10-14 13:56:47 +02:00
cellobject.h Merge branches/pep-0384. 2010-12-03 20:14:31 +00:00
ceval.h Issue 25483: Add an opcode to make f-string formatting more robust. 2015-11-03 12:45:05 -05:00
classobject.h Merge branches/pep-0384. 2010-12-03 20:14:31 +00:00
code.h code_richcompare() now uses the constants types 2016-01-22 12:33:12 +01:00
codecs.h Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5 2015-11-02 04:04:57 +00:00
compile.h PEP 479: Change StopIteration handling inside generators. 2015-05-09 11:44:30 -04:00
complexobject.h Issue #21803: remove macro indirections in complexobject.h 2014-07-07 18:49:30 -04:00
datetime.h #18466: fix more typos. Patch by Févry Thibault. 2013-08-17 16:57:41 +03:00
descrobject.h Issue #13577: various kinds of descriptors now have a __qualname__ attribute. 2011-12-12 13:47:25 +01:00
dictobject.h Issue #25914: Fixed and simplified OrderedDict.__sizeof__. 2015-12-22 08:16:18 +02:00
dtoa.h Issue #14521: Make result of float('nan') and float('-nan') more consistent across platforms. Further, don't rely on Py_HUGE_VAL for float('inf'). 2012-04-29 15:31:56 +01:00
dynamic_annotations.h fix instances of consecutive articles (closes #23221) 2015-01-13 09:17:24 -05:00
enumobject.h
errcode.h Issue #12705: Raise SyntaxError when compiling multiple statements as single interactive statement 2012-01-19 01:08:41 -06:00
eval.h Merge branches/pep-0384. 2010-12-03 20:14:31 +00:00
fileobject.h Issue #23524: Replace _PyVerify_fd function with calling _set_thread_local_invalid_parameter_handler on every thread. 2015-03-06 14:47:02 -08:00
fileutils.h Issue #23524: Replace _PyVerify_fd function with calls to _set_thread_local_invalid_parameter_handler. 2015-04-12 00:26:27 -04:00
floatobject.h Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues 2012-06-22 14:55:41 -04:00
frameobject.h Issue #14432: Remove the thread state field from the frame structure. Fix a 2013-12-13 02:01:38 +01:00
funcobject.h PEP 3155 / issue #13448: Qualified name for classes and functions. 2011-11-25 18:56:07 +01:00
genobject.h Issue #24400: Introduce a distinct type for 'async def' coroutines. 2015-06-22 12:19:30 -04:00
graminit.h PEP 0492 -- Coroutines with async and await syntax. Issue #24017. 2015-05-11 22:57:16 -04:00
grammar.h Removed trailing tabs. 2015-03-21 09:25:53 +02:00
import.h (Merge 3.3) Issue #19932: Fix typo in import.h, missing whitespaces in function prototypes. 2013-12-10 01:20:39 +01:00
intrcheck.h Issue #12328: Under Windows, refactor handling of Ctrl-C events and 2011-11-21 21:26:56 +01:00
iterobject.h Rename _PyIter_GetBuiltin to _PyObject_GetBuiltin, and do not include it in the stable ABI. 2012-04-05 00:04:20 +02:00
listobject.h Issue #24221: Small optimizations for heapq. 2015-05-22 00:41:57 -07:00
longintrepr.h Issue #18783: Removed existing mentions of Python long type in docstrings, 2013-08-27 19:40:23 +03:00
longobject.h Modify _PyBytes_DecodeEscapeRecode() to use _PyBytesAPI 2015-10-14 13:32:13 +02:00
marshal.h Issue #1772673: The type of char* arguments now changed to const char*. 2013-10-19 21:03:34 +03:00
memoryobject.h Closes #22668: Merge from 3.4. 2015-01-29 14:29:51 +01:00
metagrammar.h
methodobject.h Removed trailing whitespaces in miscalenous files. 2015-04-03 19:42:32 +03:00
modsupport.h Issue 24365: Conditionalize PEP 489 additions to the stable ABI 2015-06-02 19:06:47 -04:00
moduleobject.h Issue 24365: Conditionalize PEP 489 additions to the stable ABI 2015-06-02 19:06:47 -04:00
namespaceobject.h Eric Snow's implementation of PEP 421. 2012-06-03 16:18:47 -04:00
node.h Removed trailing tabs. 2015-03-21 09:25:53 +02:00
object.h Issue #20440: Massive replacing unsafe attribute setting code with special 2015-12-24 10:35:59 +02:00
objimpl.h Issue #21233: Add new C functions: PyMem_RawCalloc(), PyMem_Calloc(), 2014-05-02 22:31:14 +02:00
odictobject.h Issue #24347: Set KeyError if PyDict_GetItemWithError returns NULL. 2015-06-01 22:59:08 -06:00
opcode.h Issue 25483: Add an opcode to make f-string formatting more robust. 2015-11-03 12:45:05 -05:00
osdefs.h Issue #22591: Drop support of MS-DOS 2014-10-10 11:55:41 +02:00
parsetok.h Issue #1772673: The type of char* arguments now changed to const char*. 2013-10-19 21:03:34 +03:00
patchlevel.h Post-release fixups for Python 3.5.1. 2015-12-06 21:53:27 -08:00
pgen.h
pgenheaders.h
py_curses.h Issue #25923: Added the const qualifier to static constant arrays. 2015-12-25 19:53:18 +02:00
pyarena.h Merge branches/pep-0384. 2010-12-03 20:14:31 +00:00
pyatomic.h Use Py_uintptr_t for atomic pointers 2016-01-22 14:09:55 +01:00
pycapsule.h Merged revisions 88517 via svnmerge from 2011-02-22 23:43:57 +00:00
pyctype.h Try to fix linking failures under Windows 2011-10-04 14:43:47 +02:00
pydebug.h Issue #22869: Split pythonrun into two modules 2014-11-20 21:39:37 +10:00
pyerrors.h Issue #19235: Add new RecursionError exception. Patch by Georg Brandl. 2015-07-03 01:04:23 -04:00
pyexpat.h Issue #13612: handle unknown encodings without a buffer overflow. 2013-05-25 05:25:48 -07:00
pyfpe.h Remove trailing whitespace in order to silence warnings on HP-UX. 2012-08-31 17:11:39 -04:00
pygetopt.h Fix test failure in test_cmd_line by initializing the hash secret at the earliest point. 2012-02-21 19:03:47 +01:00
pyhash.h Issue #19526: Exclude all new API from the stable ABI. 2014-01-03 21:36:49 +01:00
pylifecycle.h Issue #5319: New Py_FinalizeEx() API to exit with status 120 on failure 2015-11-30 03:18:29 +00:00
pymacconfig.h #11565: Merge with 3.1. 2011-03-16 11:35:38 +02:00
pymacro.h Issue #25558: Use compile-time asserts. 2015-11-07 15:42:38 +02:00
pymath.h Issue #25923: Added the const qualifier to static constant arrays. 2015-12-25 19:53:18 +02:00
pymem.h Issue #21233: Rename the C structure "PyMemAllocator" to "PyMemAllocatorEx" to 2014-06-02 21:57:10 +02:00
pyport.h Issue #23943: Fix typos. Patch by Piotr Kasprzyk. 2015-04-14 09:35:51 +03:00
pystate.h Add _PyThreadState_UncheckedGet() 2016-01-20 11:12:38 +01:00
pystrcmp.h
pystrhex.h Add the files missing from c9f1630cf2b1 for issue9951. 2015-04-26 00:41:00 +00:00
pystrtod.h Merge branches/pep-0384. 2010-12-03 20:14:31 +00:00
Python-ast.h Add ast.Constant 2016-01-26 00:40:57 +01:00
Python.h Issue #16991: Add a C implementation of collections.OrderedDict. 2015-05-29 22:21:39 -06:00
pythonrun.h Issue #25923: Added more const qualifiers to signatures of static and private functions. 2015-12-25 20:01:53 +02:00
pythread.h Issue #11223: Replace threading._info() by sys.thread_info 2011-04-30 14:53:09 +02:00
pytime.h Issue #25155: Add _PyTime_AsTimevalTime_t() function 2015-09-18 13:36:17 +02:00
rangeobject.h
setobject.h Clarify comments on setentry invariants. 2015-08-01 15:21:41 -07:00
sliceobject.h Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
structmember.h s/tabs/spaces, and clean trailing whitespace 2012-05-23 07:09:08 +03:00
structseq.h Issue #18520: Add a new PyStructSequence_InitType2() function, same than 2013-07-22 22:24:54 +02:00
symtable.h remove the concept of an unoptimized function scope from the compiler, since it can't happen anymore 2015-04-27 21:44:22 -04:00
sysmodule.h Issue #22193: Fixed integer overflow error in sys.getsizeof(). 2014-11-15 13:21:37 +02:00
token.h PEP 0492 -- Coroutines with async and await syntax. Issue #24017. 2015-05-11 22:57:16 -04:00
traceback.h Issue #24436: Added const qualifiers for char* arguments of _PyTraceback_Add. 2015-06-21 15:59:46 +03:00
tupleobject.h Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues 2012-06-22 14:55:41 -04:00
typeslots.h Issue 24365: Conditionalize PEP 489 additions to the stable ABI 2015-06-02 19:06:47 -04:00
ucnhash.h Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
unicodeobject.h Issue #25523: Merge a-to-an corrections from 3.5. 2015-11-02 14:44:29 +02:00
warnings.h Issue #19526: Exclude all new API from the stable ABI. 2014-01-03 21:36:49 +01:00
weakrefobject.h Closes #13867: remove untrue comment about PyWeakref_Check(). 2013-10-08 19:50:26 +02:00