Python embedded like PHP

Paul Rubin phr-n2002a at nightsong.com
Wed Mar 20 07:46:12 EST 2002


Andy Gimblett <gimbo at ftech.net> writes:
> 
> > > <ul tal:define="sequence python:container.mydb.selectbyname(name='peter')">
> > >   <li tal:repeat="item sequence">
> > >     <span tal:replace="item/surname">surname</span>
> > >   </li>
> > > </ul>
> 
> > Geez, I find all this pseudo-HTML horrendous.  Why not just embed
> 
> It's not pseudo-HTML, it's W3C compliant HTML (is "<?", btw?).

I don't remember "tal:repeat" as a valid property of any HTML tag 
from the HTML spec.  That's why I call it pseudo-HTML.

> IMHO it's also better looking than <? ?> tags.

The issue isn't the <? ?> which can be replaced by something else if
you want.  It's making code look like HTML properties instead of
making it look like code.



More information about the Python-list mailing list