[Zope] The logic of the _ variable (Q1959)

picasso@videotron.ca picasso@videotron.ca
Thu, 16 Sep 1999 20:08:29 -0400


> <dtml-var expr="_.render(_['x'])"> looks in
> the current Document Template namespace for a
> variable named 'x' and renders it fully.

It works but I have never see mention of this _ method in the
documentation. Is it new? Is it possible to display a list of all the
attributs of the _ variable. (Something like _.keys())

>to get at with <dtml-var expr="x(_,_.None)">.

I have never seen that too. Is it somewhere in the docs?
I tried :
<dtml-var "index_html(_,_.None)">
I got:
Error Type: KeyError
Error Value: standard_html_header

I find it really interesting to understand the magic of these expressions.

Thanks for your comments.

***************************
Oscar Picasso
picasso@videotron.ca
***************************