- 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.
- 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.
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.
........