Py 3 handles exception propagation a little differently?
This commit is contained in:
parent
2cc0ea0548
commit
c6b46e5f01
|
|
@ -61,11 +61,10 @@ def joy(stack, expression, dictionary, viewer=None):
|
||||||
|
|
||||||
term, expression = expression
|
term, expression = expression
|
||||||
if isinstance(term, Symbol):
|
if isinstance(term, Symbol):
|
||||||
try:
|
if term not in dictionary:
|
||||||
term = dictionary[term]
|
|
||||||
except KeyError:
|
|
||||||
raise UnknownSymbolError(term)
|
raise UnknownSymbolError(term)
|
||||||
stack, expression, dictionary = term(stack, expression, dictionary)
|
func = dictionary[term]
|
||||||
|
stack, expression, dictionary = func(stack, expression, dictionary)
|
||||||
else:
|
else:
|
||||||
stack = term, stack
|
stack = term, stack
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue