[Zope] How do I test a date to be valid?

Chris Withers chrisw at nipltd.com
Thu Sep 25 08:47:22 EDT 2003


Dragos Chirila wrote:
> Why don't you use try .. except ?
> 
> python:
> try:
>     x = DateTime(...)
> except:
>     x = None

bare except clauses are BAD.

> In DTML you have dtml-try .. dtml-except

Anyone doing that kind of logic in DTML deserves to be hung, drawn and quartered ...

Chris




More information about the Zope mailing list