summaryrefslogtreecommitdiff
path: root/Python/ast.c
AgeCommit message (Collapse)AuthorLines
2019-10-26[2.7] bpo-38535: Fix positions for AST nodes for calls without arguments in ↵Serhiy Storchaka-2/+3
decorators. (GH-16861). (GH-16931) (cherry picked from commit 26ae9f6d3d755734c9f371b9356325afe5764813)
2018-08-22[2.7] bpo-34457: Python/ast.c: Add missing NULL check to ↵Alexey Izbyshev-0/+2
alias_for_import_name(). (GH-8852) (GH-8858) Reported by Svace static analyzer. (cherry picked from commit 28853a249b1d0c890b7e9ca345290bb8c1756446) Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
2016-09-13fix misleading indentation (closes #28139)Benjamin Peterson-1/+1
2016-07-28Spelling and grammar fixes in code comments and documentationMartin Panter-1/+1
2014-08-09remove castsBenjamin Peterson-4/+4
2014-07-29Issue #21591: Handle exec backwards compatibility in the AST builder.Dirkjan Ochtman-0/+12
Instead of deferring until runtime. This makes sure we hit the right conditions in dealing with unqualified exec statements. Reviewed by Victor Stinner. Test follows in a later commit.
2014-06-01Issue #19656: Running Python with the -3 option now also warns aboutSerhiy Storchaka-5/+17
non-ascii bytes literals.
2012-11-25Issue #9011: AST creation no longer modifies CST for negated numeric literals.Mark Dickinson-10/+15
2010-08-19Merged revisions 84209, 84214 via svnmerge fromAmaury Forgeot d'Arc-26/+20
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84209 | amaury.forgeotdarc | 2010-08-19 19:43:15 +0200 (jeu., 19 août 2010) | 5 lines Check the return values for all functions returning an ast node. Failure to do it may result in strange error messages or even crashes, in admittedly convoluted cases that are normally syntax errors, like: def f(*xx, __debug__): pass ........ r84214 | amaury.forgeotdarc | 2010-08-19 23:32:38 +0200 (jeu., 19 août 2010) | 3 lines Add tests for r84209 (crashes in the Ast builder) Also remove one tab, and move a check closer to the possible failure. ........
2010-06-24prevent assignment to set literalsBenjamin Peterson-0/+1
2010-05-05Remove two unneeded branches to an 'if' statement by applying De Morgan's LawBrett Cannon-73/+68
and creating a single 'if' statement along with a NULL default value for a variable. Also clean up a bunch of whitespace. Found using Clang's static analyzer.
2010-05-05Partially revert the over-reaching r80813.Brett Cannon-68/+73
2010-05-05Remove three unneeded variable assignments.Brett Cannon-73/+68
Found using Clang's static analyzer.
2010-01-11Issue #2333: Backport set and dict comprehensions syntax.Alexandre Vassalotti-86/+149
2010-01-09Issue #2335: Backport set literals syntax from Python 3.x.Alexandre Vassalotti-21/+44
2009-11-19improve several corner cases related with argument names in parenthesisBenjamin Peterson-1/+16
- Fix #7362: give a good error message for parenthesized arguments with defaults. - Add a py3k warning for any parenthesized arguments since those are not allowed in Py3. This warning is not given in tuple unpacking, since that incurs the tuple unpacking warning.
2009-10-29do a backport of r75928Benjamin Peterson-9/+12
The added test does not fail without the patch, but we still fix the issue of surrogates being used in wide builds where they should not be.
2009-10-27Removed PyOS_ascii_atof from ast.c, as mentioned in issue 7117.Eric Smith-6/+6
2009-10-03#7050 fix a SystemError when using tuple unpacking and augmented assignmentBenjamin Peterson-0/+13
2009-08-15better col_offsets for "for" statements with tuple unpacking #6704Benjamin Peterson-11/+12
Patch from Frank Wierzbicki.
2009-07-20the Slice in x[::] has to have step as None to help the interpreterBenjamin Peterson-1/+15
2009-06-13when no module is given in a 'from' relative import, make ImportFrom.module NULLBenjamin Peterson-3/+1
2009-06-13give a better error message when deleting ()Benjamin Peterson-4/+7
2009-06-13set Print.values to NULL if there are no valuesBenjamin Peterson-9/+12
2009-06-13allow importing from a module named None if it has an 'as' clauseBenjamin Peterson-4/+6
2009-06-13prevent import statements from assigning to NoneBenjamin Peterson-11/+26
2009-06-13keep the slice.step field as NULL if no step expression is givenBenjamin Peterson-8/+1
2009-06-11remove check for case handled in sub-functionBenjamin Peterson-3/+0
2009-06-11revert r73361Benjamin Peterson-0/+4
2009-06-11remove duplicate checkBenjamin Peterson-4/+0
2009-06-08remove error checks already done in set_context()Benjamin Peterson-25/+0
2009-06-08remove useless assertionBenjamin Peterson-1/+0
2009-05-25Allow multiple context managers in one with statement, as proposedGeorg Brandl-20/+41
in http://codereview.appspot.com/53094 and accepted by Guido. The construct is transformed into multiple With AST nodes so that there should be no problems with the semantics.
2009-01-17#4077: No need to append \n when calling Py_FatalErrorAmaury Forgeot d'Arc-1/+1
+ fix a declaration to make it match the one in pythonrun.h
2008-12-05Issue #4461: Safety check in parsenumber (ast.c)Mark Dickinson-0/+1
2008-11-25always check the return value of NEW_IDENTIFIERBenjamin Peterson-20/+59
2008-11-21don't segfault when \N escapes are used and unicodedata fails to loadBenjamin Peterson-1/+2
Fixes #4367
2008-11-08check for assignment to __debug__ during AST generationBenjamin Peterson-1/+3
Also, give assignment to None a better error message
2008-10-25give a py3k warning when 'nonlocal' is used as a variable nameBenjamin Peterson-3/+8
2008-08-19allow keyword args to be passed in after *args #3473Benjamin Peterson-0/+5
2008-07-16Issue #3360: Fix incorrect parsing of "020000000000.0".Mark Dickinson-10/+1
2008-07-01#3219 repeated keyword arguments aren't allowed in function calls anymoreBenjamin Peterson-0/+10
2008-06-11Merge in release25-maint r60793:Gregory P. Smith-0/+3
Added checks for integer overflows, contributed by Google. Some are only available if asserts are left in the code, in cases where they can't be triggered from Python code.
2008-06-09This reverts r63675 based on the discussion in this thread:Gregory P. Smith-14/+14
http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
2008-06-08warn about parameter tuple unpackingBenjamin Peterson-0/+3
2008-06-08Warn about assigning to Py3k keywords (True and False)Benjamin Peterson-33/+27
2008-06-08add an ast_warn helper function to make adding those Py3k warnings easierBenjamin Peterson-7/+15
2008-06-08change Py3k backquote warning to a SyntaxWarning and add a testBenjamin Peterson-1/+1
2008-05-26Renamed PyString to PyBytesChristian Heimes-18/+18
2008-05-03The compiling struct is now passed around to all AST helpers (see issue 2720)Benjamin Peterson-32/+32