From 8717d40e196bfe33c0f711f9a5f143f4d55c217a Mon Sep 17 00:00:00 2001 From: Paul Tagliamonte Date: Sun, 12 May 2013 13:40:30 -0400 Subject: [PATCH] Rushed fix for the contrib.meth macros --- hy/contrib/meth.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hy/contrib/meth.py b/hy/contrib/meth.py index 859f7f6..eacd443 100644 --- a/hy/contrib/meth.py +++ b/hy/contrib/meth.py @@ -28,7 +28,7 @@ from hy.macros import macro def router(tree, rkwargs=None): - tree.pop(0) + tree = HyExpression(tree) name = tree.pop(0) path = tree.pop(0) tree.insert(0, HySymbol("fn")) @@ -44,15 +44,15 @@ def router(tree, rkwargs=None): @macro("route") -def route_macro(tree): +def route_macro(*tree): return router(tree) @macro("post_route") -def post_route_macro(tree): +def post_route_macro(*tree): return router(tree, rkwargs=HyList([HyString("POST")])) @macro("get_route") -def get_route_macro(tree): +def get_route_macro(*tree): return router(tree, rkwargs=HyList([HyString("GET")]))