[ZPT] Possible bug in ZPT

Andreas Jung andreas@andreas-jung.com
Sat, 21 Dec 2002 09:03:03 +0100


--On Freitag, 20. Dezember 2002 21:18 +0100 Dieter Maurer 
<dieter@handshake.de> wrote:

> Andreas Jung writes:
>  > I expected that the "sequence" module is availble from the modules
>  > namespace.
> "sequence" is not a free standing module but part of the
> "DocumentTemplate" package (which is not importable in TTW code).

Then this is a documentation bug of the Zope Book which mentions that
the sequence is available through the module namespace.
>
>  > But using modules['sequence'] raises an Unauthorized exception. On the
> other  > side I can use "<span tal:content="python: sequence.sort(...)" >.
> The "sequence" function (! not module) is available as "_.sequence" in
> DTML and these symbols are available as built-ins in Python Scripts and
> Page Templates (exception "string" which has a different meaning in Page
> Templates).
>
> Thus, this is not a bug.
>
It is.

Andreas