Skip to content

Instantly share code, notes, and snippets.

Julien Danjou jd

Block or report user

Report or block jd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:5977213
% git diff
diff --git a/ceilometer/storage/impl_mongodb.py b/ceilometer/storage/impl_mongodb.py
index 4580833..84bd8fc 100644
--- a/ceilometer/storage/impl_mongodb.py
+++ b/ceilometer/storage/impl_mongodb.py
@@ -288,6 +288,8 @@ class Connection(base.Connection):
self.db.clear()
else:
self.conn.drop_database(self.db)
+ import time
View gist:5484743
(if (if 1 2) 1)
Generates the tree
ast.stmt.If
`-> ast.stmt.If
`-> ast.expr.Num
`-> ast.expr.Num
`-> ast.expr.Num
View gist:5320675
diff --git a/hy/compiler.py b/hy/compiler.py
index 24ba107..22687ca 100644
--- a/hy/compiler.py
+++ b/hy/compiler.py
@@ -157,6 +157,19 @@ class HyASTCompiler(object):
return self._mangle_branch([branch])
@builds("if")
+ def wraps_if_expression(self, expr):
+ return ast.Expr(
You can’t perform that action at this time.