[ZPT] Path interpolation

Shane Hathaway shane@zope.com
Fri, 2 Aug 2002 21:54:46 -0400 (EDT)


On Fri, 2 Aug 2002, Evan Simpson wrote:

> Shane Hathaway wrote:
> > Ok.  The word "interpolation" is a little confusing here--maybe we
> > should call it string substitution. :-)
>
> It's standard terminology AFAIK, viz:
>
> http://www.python.org/peps/pep-0215.html

So is string substitution, which is a simpler word.  When you said
interpolation, I didn't know whether you meant replacement before or after
tokenization.

Not that it matters. :-)

> Did you have a particular reason to restrict '?' to just after a slash?
>   I figured it could be given syntax identical to '$', just a slightly
> different meaning.

I don't want to see the syntax get out of control.  If you put a question
mark after some characters, then it starts to look like globbing:

  context/somefile.?c

Also, you have to decide what the extent of the variable name is if it's
not in curly braces.  But if it always comes after a slash (which seems to
be the case anyway) then the extent is fairly obvious.  Just a small
concern.

Shane