[Petal] Questions current parser

Evan Simpson evan at 4-am.com
Wed Jun 11 12:49:29 BST 2003


Fergal Daly wrote:
> While we're on the subject of parsing things. I just noticed two differences 
> with TALES. TALES allows . and , in url_segments and variable names, Petal 
> doesn't, also Petal seems to allow you use . as the path separator instead of 
> /. Is there a reason for these differences?

On the TALES side, paths were designed to deal with Zope object Ids, 
which can contain spaces and a wide variety of punctuation (except '/'). 
   A Zope path might easily look like "here/banner 3x3.gif".  Function 
calls requiring parameters or other complications are dealt with by 
using "python:" expressions.

When Jean-Michel started PETAL, I think he wanted more capabilities in 
path expressions, and wasn't dealing with an object system that maps 
neatly to URLs.  Thus the more restrictive naming (made up for with a 
proper escaping facility) and optional Perlish '.' separators.

Cheers,

Evan @ 4a-m



More information about the Petal mailing list