[Zope-dev] Re: TALES idea: tuple unpacking

Jean Jordaan jean@upfrontsystems.co.za
Wed, 23 Jul 2003 16:49:42 +0200


It is absolutely amazing how slippery this stuff is to pin down.
The same ideas keep popping up and then slowly subsiding under 
the weight of exceptions, prefixes and caveats. 

I kinda suspect the only way is to deliver a specific take on
the whole thing, like Evan did with the current ZPT, and to see 
how that pans out, instead of teasing the current ZPT to creep 
after features.

That said (he continues blithely), the one bit about the current
one that bugs me is the behaviour of callables in path expressions.
This is the one I like::

  tal:define="value here/func/dict-returned-by-func/key"
  tal:define="value here/obj/method/returned-dict/key"
  tal:define="value here/dict/key/obj-stored-under-key/method"

That's the one with the downer that func can't get parameters. 
I'm totally fine with that. For parameters:: 

  tal:define="dict python:here.func('parameter'); 
              value dict/key"

-- 
Jean Jordaan
http://www.upfrontsystems.co.za