Updating the docs. Playing with Joy Kernel.

This commit is contained in:
Simon Forman
2021-11-24 08:54:08 -08:00
parent 876c68c02f
commit f7364a6161
4 changed files with 1574 additions and 17 deletions
+7 -6
View File
@@ -223,12 +223,13 @@ def BinaryBuiltinWrapper(f):
(a, (b, stack)) = stack
except ValueError:
raise StackUnderflowError('Not enough values on stack.')
if ( not isinstance(a, int)
or not isinstance(b, int)
or isinstance(a, bool) # Because bools are ints in Python.
or isinstance(b, bool)
):
raise NotAnIntError
# Boolean predicates like "or" fail here. :(
## if ( not isinstance(a, int)
## or not isinstance(b, int)
## or isinstance(a, bool) # Because bools are ints in Python.
## or isinstance(b, bool)
## ):
## raise NotAnIntError
result = f(b, a)
return (result, stack), expression, dictionary
return inner