[ZPT] CVS: Packages/TAL - README.txt:1.14

Guido van Rossum guido@digicool.com
Mon, 09 Apr 2001 18:19:10 -0500


> > what to do about old programs -- I could either provide a function
> > that checks whether a program is still valid, or I could try to make
> > the TALInterpreter support older versions (with reason).
> 
> I would expect to check whether a program is valid, then throw it out and
> recompile if it isn't.

Do you want me to provide a function that checks whether a program is
still valid?  I propose the following API:

    import TALDefs

    TALDefs.isValidProgram((program, macros)) -> Boolean

Note that isValidProgram() takes a single argument that's a tuple of
(program, macros) -- that way you can pass it the cached output from a
previous compilation without having to know its structure.

This wouldn't be a surefire test, e.g. if you gave it a
hand-constructed tuple you might have something that passed the test
but would raise an exception when passed to TALInterpreter() -- but it
would guarantee to give the correct result for anything that was ever
returned by a TAL compiler.

If you don't like this, please suggest an API...

> > Do you want the simplified handling of structure replace/content in 1.0.1?
> 
> Jim pointed out that the attribute suppression is a fairly major new
> feature, so I plan to go straight to 1.1 tomorrow.  As part of this, I went
> ahead and made Page Templates pass strictinsert=0.

OK.  Good!

--Guido van Rossum (home page: http://www.python.org/~guido/)