There is many more stupid things to do than to read words of one of the best if not the best:
(An ((Even Better) Lisp) Interpreter (in Python))
I worked on Norvig's code to make it generic enough to run in both Python 2 and Python 3. I had also done my own multiline input earlier for the basic lis.py first version and adapted it to run in both environments. I attach those files to this message I linked the thread in Norvig's own site.
Together is also my tail recursive version of factorial, which new lispy.py can optimize as regular loop and therefore manage any debth of recursion. Standard test file is also in zip and runs without errors.
Also I modified lispy.py to take single argument from command line, so you can run for example
if you have py added to PATHEXT in Windows, to get print of 5000! by the recursive function.
Here also snapshot of my lis.py multiline prompting with parenthesis counting in action.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.