• R/O
  • HTTP
  • SSH
  • HTTPS

Thun: Commit

Interpreter and library.


Commit MetaInfo

Révisionc6b46e5f018ab16120a1425496632c39f030ecf3 (tree)
l'heure2021-12-24 12:09:07
AuteurSimon Forman <sforman@hush...>
CommiterSimon Forman

Message de Log

Py 3 handles exception propagation a little differently?

Change Summary

Modification

--- a/joy/joy.py
+++ b/joy/joy.py
@@ -61,11 +61,10 @@ def joy(stack, expression, dictionary, viewer=None):
6161
6262 term, expression = expression
6363 if isinstance(term, Symbol):
64- try:
65- term = dictionary[term]
66- except KeyError:
64+ if term not in dictionary:
6765 raise UnknownSymbolError(term)
68- stack, expression, dictionary = term(stack, expression, dictionary)
66+ func = dictionary[term]
67+ stack, expression, dictionary = func(stack, expression, dictionary)
6968 else:
7069 stack = term, stack
7170
Afficher sur ancien navigateur de dépôt.