Python syntax in Lisp and Scheme

Terry Reedy tjreedy at udel.edu
Sun Oct 12 01:03:42 EDT 2003


"Peter Seibel" <peter at javamonkey.com> wrote in message
news:m34qyfibc8.fsf at javamonkey.com...
> Note that it's the ability, at macro expansion time, to treat the
code
> as data that allows me to generate test failure messages that
contain
> the literal code of the test case *and* the value that it evaluated
> to.  I could certainly write a HOF version of CHECK that accepts a
list
>of test-case-functions:
...
> But since each test case would be an opaque function object by the
> time CHECK sees it, there'd be no good option for nice reporting
from
> the test framework.

But can't you explicitly quote the test cases for input to the HOF and
eval them within the HOF, so you again have both the literal code and
value generated?  Not as pretty, admittedly, and perhaps less
efficient, but workable?

Terry J. Reedy






More information about the Python-list mailing list