From: Sam Sungshik Kong [mailto:ssk@chol.nospam.net]
In python for ASP, for instance, I frequently write the
following style
code.html = “”"
%(name)s
%(age)d
“”"
di = {
“name”: get_name_from_db(),
“age”: get_age_from_db()
}
Response.Write(html % di)Well, I may change the sequence (get the values first and setup the
formatting string). However, in the above case, formatting is outer
bound and the values are details. My brain feels more comfortable in
this way…;^)Sam
For this sort of situation, you may want to use a full-blown templating
library. However, there are other situations where (as noted), what
you’re using is better than in-place substitution.
-austin
···
–
austin ziegler * austin.ziegler@evault.com