[Zope] dtml-in iteration over a string.split
Michel Pelletier
michel@digicool.com
Wed, 15 Mar 2000 09:34:06 -0800
Curtis Maloney wrote:
>
> Annoying, yes... but that's the way somebody chose to go. I don't know why,
> but it's there. In fact, if anyone could give me a good reason why it is this
> way, I would be most appreciative.
In the beginning, there was DTML. DTML did not have expressions as was
designed to look very much like HTML, so names like sequence-item were
chosen. Later on, expressions were added. Names like 'sequence-item'
were obviously not going to do, because in a python expression it looks
like a subtraction. So, the DTML namespace was given the name _, and
given a mapping interface which allowed you to look up names in the
namespace. Thus was born _['sequence-item']. _ is a mapping like any
other.
It's really not that bad, just kinda ugly.
-Michel