Simplify the decorator hy.compiler.builds

Not so much for the efficiency gain, but to save keystrokes in the
debugger when looking at methods with lots of builds decorators.
This commit is contained in:
Konrad Hinsen 2013-04-16 17:53:02 +02:00
parent 1bcce13e1d
commit 270a619cf7

View File

@ -89,10 +89,7 @@ def ast_str(foobar):
def builds(_type): def builds(_type):
def _dec(fn): def _dec(fn):
_compile_table[_type] = fn _compile_table[_type] = fn
return fn
def shim(*args, **kwargs):
return fn(*args, **kwargs)
return shim
return _dec return _dec