summaryrefslogtreecommitdiffstats
path: root/Demo/parser/test_unparse.py
Commit message (Collapse)AuthorAgeFilesLines
* Unparse infinite imaginary literals correctly. Add some more numeric tests.Mark Dickinson2010-06-301-0/+14
|
* Revert accidental extra changes included in r82391.Mark Dickinson2010-06-301-13/+1
|
* Issue #9011: Tests for Python 3.2's treatment of negated imaginary literals.Mark Dickinson2010-06-301-1/+13
|
* Output try-except-finally statements where appropriate.Mark Dickinson2010-06-301-1/+15
|
* Collapse else: if: ... into elif:Mark Dickinson2010-06-301-0/+22
|
* Fix typo in unparsing of a class definition.Mark Dickinson2010-06-291-0/+2
|
* test_unparse.py: Do roundtrip testing for all Python files in Lib and Lib/test.Mark Dickinson2010-06-291-8/+46
|
* More unparse.py fixes:Mark Dickinson2010-06-291-0/+7
| | | | | | | - parenthesize lambdas, to avoid turning (lambda : int)() into lambda: int() - unparse an infinite float literals in the AST as an overflowing finite value unparse.py now successfully round-trips on all valid Lib/*.py and Lib/test/*.py files.
* Add parentheses around numeric literals, to avoid turning 3 .bit_length() ↵Mark Dickinson2010-06-291-0/+3
| | | | into 3.bit_length().
* Update Demo/parser/unparse.py to current Python 3.x syntax. Additions:Mark Dickinson2010-06-281-4/+79
| | | | | | | | | | | | | | | | | | - relative imports - keyword-only arguments - function annotations - class decorators - raise ... from ... - except ... as ... - nonlocal - bytes literals - set literals - set comprehensions - dict comprehensions Removals: - print statement. Some of this should be backported to 2.x.
* Merged revisions 82345 via svnmerge fromMark Dickinson2010-06-281-0/+4
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82345 | mark.dickinson | 2010-06-28 20:54:19 +0100 (Mon, 28 Jun 2010) | 1 line unparse.py: fix mispaced parentheses in chained comparisons ........
* Merged revisions 82338,82340-82341 via svnmerge fromMark Dickinson2010-06-281-0/+61
svn+ssh://pythondev@svn.python.org/python/trunk ........ r82338 | mark.dickinson | 2010-06-28 20:31:41 +0100 (Mon, 28 Jun 2010) | 9 lines Fix some shallow bugs in Demo/parser/unparse.py, and add tests: - insert commas between entries in del statement - left and right shifts were represented as >> and << (respectively); reverse - unindent properly after for: else: or while: else: - add parens around the result of an unary operation - add parens around negative numbers, to avoid turning (-1)**2 into -1**2. ........ r82340 | mark.dickinson | 2010-06-28 20:34:15 +0100 (Mon, 28 Jun 2010) | 1 line Fix typo in test_unparse.py. ........ r82341 | mark.dickinson | 2010-06-28 20:38:19 +0100 (Mon, 28 Jun 2010) | 1 line Set svn:eol-style on test_unparse.py. ........