summaryrefslogtreecommitdiff
path: root/Python/ast.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #27352: Correct the validation of the ImportFrom AST node and simplifySerhiy Storchaka2016-06-271-2/+2
| | | | the implementation of the IMPORT_NAME opcode.
* Issue #23275: Allow () = iterable assignment syntaxBerker Peksag2016-05-181-7/+2
| | | | Documentation updates by Martin Panter.
* remove unused c_encoding struct memberBenjamin Peterson2016-02-251-17/+4
|
* rewrite parsestr() so it's comprehensible; remove dead codeBenjamin Peterson2016-02-251-24/+12
|
* c_encoding can never be NULL, which allows some code simplificationBenjamin Peterson2016-02-251-47/+43
|
* Issue #26146: enhance ast.Constant error messageVictor Stinner2016-01-271-1/+3
| | | | | | | Mention the name of the invalid type in error message of AST validation for constants. Suggestion made by Joseph Jevnik on a review.
* Fix a refleak in validate_constant()Victor Stinner2016-01-271-0/+2
| | | | Issue #26146.
* Add ast.ConstantVictor Stinner2016-01-261-0/+50
| | | | | | | | | | | | | | | | | | | | | 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
* Fix two instances of wrong indentation.Georg Brandl2016-01-181-2/+2
|
* Issue #20440: More use of Py_SETREF.Serhiy Storchaka2015-12-271-7/+3
|\ | | | | | | | | This patch is manually crafted and contains changes that couldn't be handled automatically.
| * Issue #25555: Fix parser and AST: fill lineno and col_offset of "arg" node whenVictor Stinner2015-11-061-6/+3
| | | | | | | | compiling AST from Python objects.
* | Issue #25923: Added the const qualifier to static constant arrays.Serhiy Storchaka2015-12-251-2/+2
| |
* | Issue #25555: Fix parser and AST: fill lineno and col_offset of "arg" node whenVictor Stinner2015-11-061-6/+3
| | | | | | | | compiling AST from Python objects.
* | One more typo in a commentMartin Panter2015-10-071-1/+1
| |
* | merge 3.5 (#25131)Benjamin Peterson2015-09-251-4/+10
|\ \ | |/
| * make opening brace of container literals and comprehensions correspond to ↵Benjamin Peterson2015-09-251-4/+10
| | | | | | | | the line number and col offset of the AST node (closes #25131)
* | Fixed error creation if the problem is an empty expression in an f-string: ↵Eric V. Smith2015-09-241-6/+5
| | | | | | | | use ast_error instead of PyErr_SetString.
* | Move f-string compilation of the expression earlier, before the conversion ↵Eric V. Smith2015-09-231-15/+51
| | | | | | | | character and format_spec are checked. This allows for error messages that more closely match what a user would expect.
* | Issue #24779: Remove unused rawmode parameter to unicode_decode.Eric V. Smith2015-09-211-6/+3
| |
* | Issue #24965: Implement PEP 498 "Literal String Interpolation". ↵Eric V. Smith2015-09-191-56/+929
| | | | | | | | Documentation is still needed, I'll open an issue for that.
* | Fix ast_for_atom()Victor Stinner2015-09-031-0/+1
| | | | | | | | | | Clear PyObject_Str() exception if it failed, ast_error() should not be called with an exception set.
* | Merge 3.5 (issue #24975)Yury Selivanov2015-09-021-2/+4
|\ \ | |/
| * Issue #24975: Fix AST compilation for PEP 448 syntax.Yury Selivanov2015-09-011-2/+4
| |
* | Fix a trivial typo.Eric V. Smith2015-08-211-1/+1
| |
* | Issue #9232: Support trailing commas in function declarations.Robert Collins2015-08-121-9/+14
|/ | | | | | For example, "def f(*, a = 3,): pass" is now legal. Patch from Mark Dickinson.
* Issue #24791: Fix grammar regression for call syntax: 'g(*a or b)'.Yury Selivanov2015-08-051-33/+32
|
* PEP 0492 -- Coroutines with async and await syntax. Issue #24017.Yury Selivanov2015-05-111-21/+153
|
* PEP 448: additional unpacking generalizations (closes #2292)Benjamin Peterson2015-05-051-114/+222
| | | | Patch by Neil Girdhar.
* Initialize variables to prevent GCC warningsVictor Stinner2015-03-181-2/+4
|
* merge 3.4 (#21295)Benjamin Peterson2015-02-021-22/+13
|\
| * revert lineno and col_offset changes from #16795 (closes #21295)Benjamin Peterson2015-02-021-22/+13
| |
| * set line and column numbers for keyword-only arg nodes (closes #20619)Benjamin Peterson2014-02-131-0/+2
| |
* | PEP 465: a dedicated infix operator for matrix multiplication (closes #21176)Benjamin Peterson2014-04-091-2/+6
| |
* | set line and column numbers for keyword-only arg nodes (closes #20619)Benjamin Peterson2014-02-131-0/+2
|/
* Issue #1772673: The type of `char*` arguments now changed to `const char*`.Serhiy Storchaka2013-10-191-8/+6
|
* Issue #4555: All exported C symbols are now prefixed with either "Py" or "_Py".Antoine Pitrou2013-10-121-32/+32
| | | | ("make smelly" now clean)
* Close #11619: The parser and the import machinery do not encode UnicodeVictor Stinner2013-08-261-16/+21
| | | | filenames anymore on Windows.
* Fix potential NULL pointer dereferencing in ast moduleChristian Heimes2013-07-241-1/+1
|\ | | | | | | CID 719690
| * Fix potential NULL pointer dereferencing in ast moduleChristian Heimes2013-07-241-1/+1
| | | | | | | | CID 719690
* | Issue #18408: Fix ast_for_atom(), PyErr_Fetch(&type, &value, &tback) can set ↵Victor Stinner2013-07-171-1/+1
| | | | | | | | value to NULL
* | Issue #18408: Handle PyArena_AddPyObject() failure in ast.cVictor Stinner2013-07-171-5/+20
| | | | | | | | | | PyList_Append() (called by PyArena_AddPyObject()) can fail because of a MemoryError for example.
* | move declaration to top of blockBenjamin Peterson2013-03-181-1/+2
| |
* | unify some ast.argument's attrs; change Attribute column offset (closes #16795)Benjamin Peterson2013-03-181-44/+28
| | | | | | | | Patch from Sven Brauch.
* | Issue #12983: Bytes literals with invalid \x escape now raise a SyntaxErrorSerhiy Storchaka2013-02-101-7/+11
|\ \ | |/ | | | | and a full traceback including line number.
| * Issue #12983: Bytes literals with invalid \x escape now raise a SyntaxErrorSerhiy Storchaka2013-02-101-7/+11
| |\ | | | | | | | | | and a full traceback including line number.
| | * Issue #12983: Bytes literals with invalid \x escape now raise a SyntaxErrorSerhiy Storchaka2013-02-101-7/+11
| | | | | | | | | | | | and a full traceback including line number.
* | | Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) ↵Antoine Pitrou2013-02-091-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | in the interpreter. I've left a couple of them in: zlib (third-party lib), getaddrinfo.c (doesn't include Python.h, and probably obsolete), _sre.c (legitimate use for the re.LOCALE flag), mpdecimal (needs to build without Python.h).
| * | Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) ↵Antoine Pitrou2013-02-091-1/+1
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | in the interpreter. I've left a couple of them in: zlib (third-party lib), getaddrinfo.c (doesn't include Python.h, and probably obsolete), _sre.c (legitimate use for the re.LOCALE flag), mpdecimal (needs to build without Python.h).
| | * Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) ↵Antoine Pitrou2013-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | in the interpreter. I've left a couple of them in: zlib (third-party lib), getaddrinfo.c (doesn't include Python.h, and probably obsolete), _sre.c (legitimate use for the re.LOCALE flag).
* | | create NameConstant AST class for None, True, and False literals (closes #16619)Benjamin Peterson2012-12-061-4/+18
|/ /