From fba87b1cffb6ac9b92efb0d58aea35ebe70b5685 Mon Sep 17 00:00:00 2001 From: Luciano Ramalho Date: Thu, 8 Jul 2021 00:22:48 -0300 Subject: [PATCH] Update README.md --- 02-array-seq/lispy/py3.9/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/02-array-seq/lispy/py3.9/README.md b/02-array-seq/lispy/py3.9/README.md index db6a11b..75bc6bb 100644 --- a/02-array-seq/lispy/py3.9/README.md +++ b/02-array-seq/lispy/py3.9/README.md @@ -7,7 +7,7 @@ _Luciano Ramalho_ ## Major changes -* Make the `lambda` form accept more than one expression as the body. This is consistent with _Scheme_ syntax, and provides a useful example for the book. To implement this: +* Make the `lambda` form accept more than one expression as the body. This is consistent with [_Scheme_ syntax](https://web.mit.edu/scheme_v9.2/doc/mit-scheme-ref/Lambda-Expressions.html), and provides a useful example for the book. To implement this: * In `Procedure.__call__`: evaluate `self.body` as a list of expressions, instead of a single expression. Return the value of the last expression. * In `evaluate()`: when processing `lambda`, unpack expression into `(_, parms, *body)`, to accept a list of expressions as the body. * Remove the `global_env` global `dict`. It is only used as a default value for the `env` parameter in `evaluate()`, but it is unsafe to use mutable data structures as parameter default values. To implement this: @@ -16,7 +16,7 @@ _Luciano Ramalho_ * Rewrite the custom test script [lispytest.py](https://github.com/norvig/pytudes/blob/705c0a335c1811a203e79587d7d41865cf7f41c7/py/lispytest.py) as [lis_test.py](https://github.com/fluentpython/example-code-2e/blob/master/02-array-seq/lispy/py3.9/lis_test.py): -a standard [pytest](https://docs.pytest.org) test suite including new test cases, preserving all Norvig's the test cases for +a standard [pytest](https://docs.pytest.org) test suite including new test cases, preserving all Norvig's test cases for [lis.py](https://github.com/norvig/pytudes/blob/705c0a335c1811a203e79587d7d41865cf7f41c7/py/lis.py) but removing the test cases for the features implemented only in [lispy.py](https://github.com/norvig/pytudes/blob/705c0a335c1811a203e79587d7d41865cf7f41c7/py/lispy.py)