1.1 --- a/simplify.py Sat Dec 02 01:28:16 2006 +0100
1.2 +++ b/simplify.py Sat Dec 02 02:20:47 2006 +0100
1.3 @@ -51,12 +51,12 @@
1.4 Break, CallFunc, Class, Compare, Const, Continue, Dict, Discard,
1.5 Div, FloorDiv, For, From, Function, Getattr, Global, If, Import,
1.6 Invert, Keyword, Lambda, List, Module, Mul, Name, Not, Or, Pass,
1.7 - Raise, Return, Slice, Stmt, Sub, Subscript, TryExcept, TryFinally,
1.8 - Tuple, While, UnaryAdd, UnarySub.
1.9 + Power, Raise, Return, Slice, Stmt, Sub, Subscript, TryExcept,
1.10 + TryFinally, Tuple, While, UnaryAdd, UnarySub.
1.11
1.12 Missing: Assert, Backquote, Bitand, Bitor, Bitxor, Decorators, Ellipsis,
1.13 - Exec, LeftShift, ListComp, ListCompFor, ListCompIf,
1.14 - Power, Print, Printnl, RightShift, Sliceobj, Yield.
1.15 + Exec, LeftShift, ListComp, ListCompFor, ListCompIf, Print, Printnl,
1.16 + RightShift, Sliceobj, Yield.
1.17 """
1.18
1.19 def __init__(self, builtins=0):
1.20 @@ -999,6 +999,9 @@
1.21 def visitPass(self, pass_):
1.22 return Pass(pass_, 1)
1.23
1.24 + def visitPower(self, power):
1.25 + return self._visitBinary(power, "__pow__", "__rpow__")
1.26 +
1.27 def visitRaise(self, raise_):
1.28 result = Raise(raise_, 1)
1.29 if raise_.expr2 is None: