diff options
Diffstat (limited to 'util/codegen.py')
-rw-r--r-- | util/codegen.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/util/codegen.py b/util/codegen.py index 2390daf..9678ae5 100644 --- a/util/codegen.py +++ b/util/codegen.py @@ -68,7 +68,7 @@ class SourceGenerator(NodeVisitor): """ UNARYOP_SYMBOLS = {Invert: "~", Not: "not", UAdd: "+", USub: "-"} - # TODO avoid turning (-1)**2 into -1**2 + # TODO use parentheses around expressions only where necessary BINOP_SYMBOLS = {Add: "+", Sub: "-", Mult: "*", Div: "/", Mod: "%", LShift: "<<", RShift:">>", BitOr: "|", BitXor: "^", BitAnd: "&", FloorDiv: "//", Pow: "**"} @@ -220,7 +220,6 @@ class SourceGenerator(NodeVisitor): paren_or_comma() self.write('**') self.visit(node.kwargs) - # TODO wtf??? self.write(have_args and '):' or ':') self.body(node.body) @@ -416,7 +415,6 @@ class SourceGenerator(NodeVisitor): if idx: self.write(', ') self.visit(item) - # TODO wtf??? self.write(idx and ')' or ',)') def sequence_visit(left, right): |