Call _wrap_value recursively on HyExpressions.
Without this, cases like: (defmacro foo [] `(~0)) (foo) throw exceptions, because the embedded zero is not a HyObject.
This commit is contained in:
parent
28c046c180
commit
4d2aad1b0f
@ -117,6 +117,7 @@ _wrappers = {
|
|||||||
list: lambda l: HyList(_wrap_value(x) for x in l),
|
list: lambda l: HyList(_wrap_value(x) for x in l),
|
||||||
tuple: lambda t: HyList(_wrap_value(x) for x in t),
|
tuple: lambda t: HyList(_wrap_value(x) for x in t),
|
||||||
type(None): lambda foo: HySymbol("None"),
|
type(None): lambda foo: HySymbol("None"),
|
||||||
|
HyExpression: lambda e: HyExpression(_wrap_value(x) for x in e),
|
||||||
}
|
}
|
||||||
|
|
||||||
if sys.version_info[0] < 3: # do not add long on python3
|
if sys.version_info[0] < 3: # do not add long on python3
|
||||||
|
Loading…
Reference in New Issue
Block a user