[Zope-dev] Re: TALES idea: tuple unpacking
Chris Withers
chrisw@nipltd.com
Tue, 29 Jul 2003 18:15:13 +0100
Shane Hathaway wrote:
> Literally, "user_files/int:0" says "get item 0 of user_files,
> interpreting '0' as an integer". Technically, this could be interpreted
> as "get the attribute named 0 or item 0", but an attribute name must be
> a string, so implicitly it really just says "get item 0".
>
> We've come up with a number of generally useful prefixes, BTW. Off the
> top of my head:
>
> call: -- Call a named method
> int: -- Look up an item by index
> format: -- Perform simple formatting operations like "format:money"
> zope: -- Access a big Zope API
This rocks from my perspective :-)
Chris