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:
parent
1bcce13e1d
commit
270a619cf7
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user