summaryrefslogtreecommitdiffstats
path: root/Python/ast.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #19656: Running Python with the -3 option now also warns aboutSerhiy Storchaka2014-06-011-5/+17
| | | | non-ascii bytes literals.
* Issue #9011: AST creation no longer modifies CST for negated numeric literals.Mark Dickinson2012-11-251-10/+15
|
* Merged revisions 84209, 84214 via svnmerge fromAmaury Forgeot d'Arc2010-08-191-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. ........
* prevent assignment to set literalsBenjamin Peterson2010-06-241-0/+1
|
* Remove two unneeded branches to an 'if' statement by applying De Morgan's LawBrett Cannon2010-05-051-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.
* Partially revert the over-reaching r80813.Brett Cannon2010-05-051-68/+73
|
* Remove three unneeded variable assignments.Brett Cannon2010-05-051-73/+68
| | | | Found using Clang's static analyzer.
* Issue #2333: Backport set and dict comprehensions syntax.Alexandre Vassalotti2010-01-111-86/+149
|
* Issue #2335: Backport set literals syntax from Python 3.x.Alexandre Vassalotti2010-01-091-21/+44
|
* improve several corner cases related with argument names in parenthesisBenjamin Peterson2009-11-191-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.
* do a backport of r75928Benjamin Peterson2009-10-291-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.
* Removed PyOS_ascii_atof from ast.c, as mentioned in issue 7117.Eric Smith2009-10-271-6/+6
|
* #7050 fix a SystemError when using tuple unpacking and augmented assignmentBenjamin Peterson2009-10-031-0/+13
|
* better col_offsets for "for" statements with tuple unpacking #6704Benjamin Peterson2009-08-151-11/+12
| | | | Patch from Frank Wierzbicki.
* the Slice in x[::] has to have step as None to help the interpreterBenjamin Peterson2009-07-201-1/+15
|
* when no module is given in a 'from' relative import, make ImportFrom.module NULLBenjamin Peterson2009-06-131-3/+1
|
* give a better error message when deleting ()Benjamin Peterson2009-06-131-4/+7
|
* set Print.values to NULL if there are no valuesBenjamin Peterson2009-06-131-9/+12
|
* allow importing from a module named None if it has an 'as' clauseBenjamin Peterson2009-06-131-4/+6
|
* prevent import statements from assigning to NoneBenjamin Peterson2009-06-131-11/+26
|
* keep the slice.step field as NULL if no step expression is givenBenjamin Peterson2009-06-131-8/+1
|
* remove check for case handled in sub-functionBenjamin Peterson2009-06-111-3/+0
|
* revert r73361Benjamin Peterson2009-06-111-0/+4
|
* remove duplicate checkBenjamin Peterson2009-06-111-4/+0
|
* remove error checks already done in set_context()Benjamin Peterson2009-06-081-25/+0
|
* remove useless assertionBenjamin Peterson2009-06-081-1/+0
|
* Allow multiple context managers in one with statement, as proposedGeorg Brandl2009-05-251-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.
* #4077: No need to append \n when calling Py_FatalErrorAmaury Forgeot d'Arc2009-01-171-1/+1
| | | | + fix a declaration to make it match the one in pythonrun.h
* Issue #4461: Safety check in parsenumber (ast.c)Mark Dickinson2008-12-051-0/+1
|
* always check the return value of NEW_IDENTIFIERBenjamin Peterson2008-11-251-20/+59
|
* don't segfault when \N escapes are used and unicodedata fails to loadBenjamin Peterson2008-11-211-1/+2
| | | | Fixes #4367
* check for assignment to __debug__ during AST generationBenjamin Peterson2008-11-081-1/+3
| | | | Also, give assignment to None a better error message
* give a py3k warning when 'nonlocal' is used as a variable nameBenjamin Peterson2008-10-251-3/+8
|
* allow keyword args to be passed in after *args #3473Benjamin Peterson2008-08-191-0/+5
|
* Issue #3360: Fix incorrect parsing of "020000000000.0".Mark Dickinson2008-07-161-10/+1
|
* #3219 repeated keyword arguments aren't allowed in function calls anymoreBenjamin Peterson2008-07-011-0/+10
|
* Merge in release25-maint r60793:Gregory P. Smith2008-06-111-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.
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-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.
* warn about parameter tuple unpackingBenjamin Peterson2008-06-081-0/+3
|
* Warn about assigning to Py3k keywords (True and False)Benjamin Peterson2008-06-081-33/+27
|
* add an ast_warn helper function to make adding those Py3k warnings easierBenjamin Peterson2008-06-081-7/+15
|
* change Py3k backquote warning to a SyntaxWarning and add a testBenjamin Peterson2008-06-081-1/+1
|
* Renamed PyString to PyBytesChristian Heimes2008-05-261-18/+18
|
* The compiling struct is now passed around to all AST helpers (see issue 2720)Benjamin Peterson2008-05-031-32/+32
|
* Patch #2511: Give the "excepthandler" AST item proper attributes by making ↵Georg Brandl2008-03-301-3/+3
| | | | it a Sum.
* Patch #2477: Added from __future__ import unicode_literalsChristian Heimes2008-03-261-11/+14
| | | | The new PyParser_*Ex() functions are based on Neal's suggestion and initial patch. The new __future__ feature makes all '' and r'' unicode strings. b'' and br'' stay (byte) strings.
* Make Py3k warnings consistent w.r.t. punctuation; also respect theGeorg Brandl2008-03-251-1/+1
| | | | EOL 80 limit and supply more alternatives in warning messages.
* Issue #2400: Allow relative imports to "import *".Martin v. Löwis2008-03-191-4/+0
|
* Issue#2238: some syntax errors from *args or **kwargs expressionsAmaury Forgeot d'Arc2008-03-051-0/+4
| | | | | | | | | | | | | | would give bogus error messages, because of untested exceptions:: >>> f(**g(1=2)) XXX undetected error Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'int' object is not iterable instead of the expected SyntaxError: keyword can't be an expression Will backport.
* Patch #1759: Backport of PEP 3129 class decoratorsChristian Heimes2008-02-231-24/+46
| | | | with some help from Georg