From: "Walter D=F6rwald" <walter@livinglogic.de> > > With blocks ifs and fors could look like this: > > node =3D html.table(border=3D0, cellpadding=3D0): > html.tr(): > html.th(): "foo" > html.td(): "bar" > if cond: > html.tr(): > html.th(): "spam" > html.td(): "eggs" > for i in xrange(10): > html.tr(): > html.th(): i > html.td(): i*i this assumes that there's a way to evaluate a thunk as an expression or s= uch that it has the value of the last expression that appears in it. Otherwise, you would have to write things using 'value' direct-return: html.th(): value i regards.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4