Re: merits of Lisp vs Python
Alex Mizrahi escreveu:
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
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(quer y_str)
query.bind("?de pt", 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>"
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(quer y_str)
query.bind("?de pt", 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>"
that should be avoided, no matter what language is used.
Stephen
Comment