On 2/14/06, Alvin Wang <[EMAIL PROTECTED]> wrote:

${dictname['dictkey']}

If the dictkey does not exist, it fails.  I tried getattr.  I must have
the syntax wrong or something but it didn't work.  How do I check for
it?

Try using ${dictname.get('dictkey', None)}. You can replace None with whatever you want the default to be (if any).

--
David
http://www.traceback.org

Reply via email to