Raise more appropriate error on missing kwarg value
This commit is contained in:
parent
0c73f78ed0
commit
4138c660cc
@ -459,8 +459,9 @@ class HyASTCompiler(object):
|
|||||||
try:
|
try:
|
||||||
value = next(exprs_iter)
|
value = next(exprs_iter)
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
msg = "Keyword argument {kw} needs a value"
|
raise HyTypeError(expr,
|
||||||
raise HyCompileError(msg.format(kw=str(expr)))
|
"Keyword argument {kw} needs "
|
||||||
|
"a value.".format(kw=str(expr)))
|
||||||
|
|
||||||
compiled_value = self.compile(value)
|
compiled_value = self.compile(value)
|
||||||
ret += compiled_value
|
ret += compiled_value
|
||||||
|
Loading…
Reference in New Issue
Block a user