summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ast.py
Commit message (Collapse)AuthorAgeFilesLines
* Use assertRaises.Georg Brandl2009-01-131-6/+1
|
* ast.literal_eval can properly evaluate complex numbers now. This fixes ↵Armin Ronacher2009-01-131-0/+11
| | | | issue4907.
* Add the "ast" module, containing helpers to ease use of the "_ast" classes.Georg Brandl2008-06-101-9/+100
|
* Revert unwanted changes.Georg Brandl2008-06-071-100/+9
|
* Factor out docstring dedenting from inspect.getdoc() into inspect.cleandoc()Georg Brandl2008-06-071-9/+100
| | | | to ease standalone use of the algorithm.
* Make AST nodes pickleable.Georg Brandl2008-03-301-0/+14
|
* Make _fields attr for no fields consistent with _attributes attr.Georg Brandl2008-03-301-0/+3
|
* Convert test_ast to unittest and add a test for r62049.Georg Brandl2008-03-301-34/+61
|
* Adapt test_ast to the new ExceptHandler type.Georg Brandl2008-03-301-1/+2
|
* #2503 make singletons compared with "is" not == or !=Benjamin Peterson2008-03-291-2/+2
| | | | Thanks to Wummel for the patch
* Patch #1759: Backport of PEP 3129 class decoratorsChristian Heimes2008-02-231-1/+1
| | | | with some help from Georg
* Fix AST compiler bug #1501934: incorrect LOAD/STORE_GLOBAL generation.Neil Schemenauer2006-07-091-1/+1
|
* Remove debugging prints.Jeremy Hylton2006-04-041-4/+0
|
* Comment out the prints. These appear to be only for debugging purposes.Neal Norwitz2006-04-041-2/+4
| | | | Jeremy, please fix this correctly after the alpha.
* Add lineno, col_offset to excephandler to enable future fix forJeremy Hylton2006-04-041-5/+8
| | | | | | | | | | | | | | | tracing/line number table in except blocks. Reflow long lines introduced by col_offset changes. Update test_ast to handle new fields in excepthandler. As note in Python.asdl says, we might want to rethink how attributes are handled. Perhaps they should be the same as other fields, with the primary difference being how they are defined for all types within a sum. Also fix asdl_c so that constructors with int fields don't fail when passed a zero value.
* Whitespace normalization.Tim Peters2006-03-011-1/+1
|
* Patch #1440601: Add col_offset attribute to AST nodes.Martin v. Löwis2006-03-011-42/+67
|
* Set EOL style to native.Tim Peters2006-02-281-178/+178
|
* Whitespace normalization.Tim Peters2006-02-281-179/+178
|
* SF patch #1438387, PEP 328: relative and absolute imports.Thomas Wouters2006-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | - 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.
* Even though we don't currently use unicode or complex numbers in the test,Neal Norwitz2006-02-271-3/+3
| | | | | | be complete when when checking types. Yield cannot be tested outside a function, so add a comment to that effect.
* Generate code to recursively copy an AST intoMartin v. Löwis2006-02-261-0/+179
a tree of Python objects. Expose this through compile().