Files
example-code-2e/18-context-mngr/lispy/README.md
Luciano Ramalho 013a26295b Update README.md
2021-06-09 14:05:43 -03:00

1.4 KiB
Raw Blame History

lis.py

This directory contains 4 versions of Peter Norvigs lis.py interpreter for a subset of Scheme.

  • original/: Norvigs lis.py unchanged, lispy.py with minor changes to run on Python 3, and the lispytest.py custom test script;
  • py3.9/: lis.py with type hints and a few minor edits—requires Python 3.9;
  • py3.10/: lis.py with type hints, pattern matching, and minor edits—requires Python 3.10.

The py3.9/ and py3.10/ directories also have identical lis_test.py to run with pytest. These files include all the lis_tests suite from original/lispytest.py, and additional separate tests for each expression and special form handled by evaluate.

lis.py is published in the norvig/pytudes repository on Github. The copyright holder is Peter Norvig and the code is licensed under the MIT license.

I wrote the changes and additions described above.

— Luciano Ramalho (@ramalho), 2021-06-09.