[Zope] Re: A little demo with the under variable
Chris McDonough
chrism@digicool.com
Fri, 18 May 2001 23:51:48 -0400
Bruce Eckel wrote:
>
> Since you can say "_['foo']"
>
> Shouldn't I be able to say:
> <dtml-in expr="_">
> <dtml-var sequence-item>
> </dtml-in>
>
> Or
>
> <dtml-in expr="_.items()">
> <dtml-var sequence-item>
> </dtml-in>
>
> Or something like that?
You're right to think that something like this would work. But there's
a *lot* of crap in the under mapping... and I don't think it has an
items method (it's not an actual dictionary). It would be intuitive to
be able to do this (if for some reason it was necessary other than for
discovery), but it's not really a feasible exercise due to the
implementation underneath it.
(of course, every time I think of this thing actually being named "_", I
invariably have a good cry and then consult rule 12 of
http://mindprod.com/unmain.html hoping that the other rules cheer me up
... ;-)
- C