[ZPT] ZPT & Request

Shane Hathaway shane at zope.com
Wed Jul 23 11:23:02 EDT 2003


Philip Kilner wrote:
> Thanks - am starting to find my way about, but it is becoming clear that 
> I need to understand Python and where ZPT ends and Python begins *much* 
> better...

In ZPT, there is a simple rule: you're in ZPT land until you use the 
"python:" expression prefix.  The syntax outside a Python expression has 
little overlap with the syntax inside a Python expression.  A Python 
expression ends either at a semicolon or at the end of an XML attribute.

A side note: way back when I was getting to know Zope, I tried to learn 
DTML before learning Python.  This turned out to be impossible because 
it was too difficult to tell where DTML ended and Python began.  I 
believe ZPT rectifies this problem by enforcing the simple rule I just 
described.  I would be opposed to any ZPT enhancement that complicates 
that rule, such as the use of parentheses in path expressions.  If we 
force people to learn Python syntax before learning ZPT, a lot of people 
will just give up and learn something else instead (like I did at first.)

Shane




More information about the ZPT mailing list