]> granicus.if.org Git - python/commit
Fix some shallow bugs in Demo/parser/unparse.py, and add tests:
authorMark Dickinson <dickinsm@gmail.com>
Mon, 28 Jun 2010 19:31:41 +0000 (19:31 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Mon, 28 Jun 2010 19:31:41 +0000 (19:31 +0000)
commit623b979553ae03ba5b2d5f60a668fbe288b2112d
tree83dae5c3048678713a0da15537a88419fc84827c
parent8c996ef45859108faf4fec8773f7810eb5782282
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.
Demo/parser/test_unparse.py [new file with mode: 0644]
Demo/parser/unparse.py