Skip to content

Instantly share code, notes, and snippets.

@mtomwing
Created January 31, 2014 21:06
Show Gist options
  • Save mtomwing/8743133 to your computer and use it in GitHub Desktop.
Save mtomwing/8743133 to your computer and use it in GitHub Desktop.
diff --git a/truthy/__main__.py b/truthy/__main__.py
index de3c8d1..f7264b4 100644
--- a/truthy/__main__.py
+++ b/truthy/__main__.py
@@ -67,7 +67,10 @@ def generate_BinaryExpr(symbol_str, operator_f):
col = [symbol_str]
for assignment in assignments:
col.append(self.evaluate(assignment))
- return self.expr1.get_table(assignments) + [col] + self.expr2.get_table(assignments)
+ res = self.expr1.get_table(assignments) + [col] + self.expr2.get_table(assignments)
+ res[0][0] = '(' + res[0][0]
+ res[-1][0] += ')'
+ return res
return AbstractBinaryExpr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment