summaryrefslogtreecommitdiff
path: root/Python/Python-ast.c
AgeCommit message (Collapse)AuthorLines
2006-08-28Fix set literals not being visited in symtable creation.Georg Brandl-1/+1
2006-08-28SF patch 1547796 by Georg Brandl -- set literals.Guido van Rossum-0/+32
2006-08-26Part of SF patch #1513870 (the still relevant part) -- add reduce() toGuido van Rossum-1/+1
functools, and adjust docs etc.
2006-08-25Remove the UNARY_CONVERT opcode (was used for backticks). Also bumped up theBrett Cannon-37/+0
import MAGIC number.
2006-04-21Commit regenerated Python-ast.c.Thomas Wouters-1/+1
2006-04-21Merge p3yk branch with the trunk up to revision 45595. This breaks a fairThomas Wouters-148/+165
number of tests, all because of the codecs/_multibytecodecs issue described here (it's not a Py3K issue, just something Py3K discovers): http://mail.python.org/pipermail/python-dev/2006-April/064051.html Hye-Shik Chang promised to look for a fix, so no need to fix it here. The tests that are expected to break are: test_codecencodings_cn test_codecencodings_hk test_codecencodings_jp test_codecencodings_kr test_codecencodings_tw test_codecs test_multibytecodec This merge fixes an actual test failure (test_weakref) in this branch, though, so I believe merging is the right thing to do anyway.
2006-03-02Fix memory leak on attributes.Martin v. Löwis-5/+13
2006-03-01Patch #1440601: Add col_offset attribute to AST nodes.Martin v. Löwis-51/+118
2006-02-28Don't pollute namespace as bad as before. All the types are static now.Neal Norwitz-152/+152
2006-02-28from __future__ import with_statement addon for 'with', mostly written byThomas Wouters-2/+2
Neal.
2006-02-28SF patch #1438387, PEP 328: relative and absolute imports.Thomas Wouters-2/+10
- IMPORT_NAME takes an extra argument from the stack: the relativeness of the import. Only passed to __import__ when it's not -1. - __import__() takes an optional 5th argument for the same thing; it __defaults to -1 (old semantics: try relative, then absolute) - 'from . import name' imports name (be it module or regular attribute) from the current module's *package*. Likewise, 'from .module import name' will import name from a sibling to the current module. - Importing from outside a package is not allowed; 'from . import sys' in a toplevel module will not work, nor will 'from .. import sys' in a (single-level) package. - 'from __future__ import absolute_import' will turn on the new semantics for import and from-import: imports will be absolute, except for from-import with dots. Includes tests for regular imports and importhooks, parser changes and a NEWS item, but no compiler-package changes or documentation changes.
2006-02-28Regenerate.Martin v. Löwis-0/+2
2006-02-27PEP 343 -- the with-statement.Guido van Rossum-0/+52
This was started by Mike Bland and completed by Guido (with help from Neal). This still needs a __future__ statement added; Thomas is working on Michael's patch for that aspect. There's a small amount of code cleanup and refactoring in ast.c, compile.c and ceval.c (I fixed the lltrace behavior when EXT_POP is used -- however I had to make lltrace a static global).
2006-02-27Create _ast module.Martin v. Löwis-29/+345
Cleanup Python-ast.c generation.
2006-02-27PEP 308 implementation, including minor refdocs and some testcases. ItThomas Wouters-0/+58
breaks the parser module, because it adds the if/else construct as well as two new grammar rules for backward compatibility. If no one else fixes parsermodule, I guess I'll go ahead and fix it later this week. The TeX code was checked with texcheck.py, but not rendered. There is actually a slight incompatibility: >>> (x for x in lambda:0) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: iteration over non-sequence changes into >>> (x for x in lambda: 0) File "<stdin>", line 1 (x for x in lambda: 0) ^ SyntaxError: invalid syntax Since there's no way the former version can be useful, it's probably a bugfix ;)
2006-02-27Avoid reinitializing the types twice.Martin v. Löwis-0/+1
2006-02-26Stop generating empty arrays.Martin v. Löwis-117/+38
2006-02-26Fix iterating over cmpop_ty lists.Martin v. Löwis-2/+7
2006-02-26Generate code to recursively copy an AST intoMartin v. Löwis-685/+1511
a tree of Python objects. Expose this through compile().
2006-01-02Regenerate.Martin v. Löwis-44/+44
2005-12-17Merge from ast-arena. This reduces the code in Python/ast.c by ~300 lines,Neal Norwitz-554/+113
simplifies a lot of error handling code, and fixes many memory leaks.
2005-12-11SF #1373150, diffs in working copy after a buildNeal Norwitz-1/+1
Strip off leading dots and slash so the generated files are the same regardless of whether you configure in the checkout directory or build. If anyone configures in a different directory, we might want a cleaner approach using os.path.*(). Hopefully this is good enough.
2005-11-13Whoops, checkin consistent versions of *all* files to stop pollutingNeal Norwitz-0/+74
a bunch of names
2005-11-13Prevent name pollution by making lots of internal functions static.Neal Norwitz-14/+28
2005-10-23Use PyErr_NoMemory() instead of rolling our own.Neal Norwitz-61/+54
Get rid of "int i" unused warnings from Python-ast.c which we are generating.
2005-10-20Merge ast-branch to headJeremy Hylton-0/+2281
This change implements a new bytecode compiler, based on a transformation of the parse tree to an abstract syntax defined in Parser/Python.asdl. The compiler implementation is not complete, but it is in stable enough shape to run the entire test suite excepting two disabled tests.