OSDN Git Service

read text from REPL, don't eval
authorSimon Forman <sforman@hushmail.com>
Fri, 24 Apr 2020 07:03:32 +0000 (00:03 -0700)
committerSimon Forman <sforman@hushmail.com>
Fri, 24 Apr 2020 07:03:32 +0000 (00:03 -0700)
joy/joy.py

index 05988c5..1ee73d3 100644 (file)
@@ -98,7 +98,7 @@ def repl(stack=(), dictionary=None):
       print(stack_to_string(stack), '<-top')
       print()
       try:
-        text = eval(input('joy? '))
+        text = input('joy? ')
       except (EOFError, KeyboardInterrupt):
         break
       viewer = TracePrinter()