merits of Lisp vs Python

Stephen Eilert spedrosa at gmail.com
Fri Dec 8 15:23:54 EST 2006


Alex Mizrahi escreveu:


>
> we should feed this text to the query-builder.
> then we should bind ?dept to our variable departament (i'm not sure how this
> is done in SPARQL, but there should be a way).
> then we should iterate over results and output HTML. a python-like
> pseudocode:
>
> query = BuildQuery(query_str)
> query.bind("?dept", departament)
> results = query.execute()
> for each rs in results:
>     print "<tr><td>" + htmlesc(rs.get("?fname")) + "</td><td>" +
> htmlesc(rs.get("?lname")) + "</td><td>" + rs.get("?salary") + "</td></tr>"

I just want to add that this kind of HTML mixed with code is something
that should be avoided, no matter what language is used.


Stephen




More information about the Python-list mailing list