Conditional except: blocks

sdd daniels at dsl-only.net
Fri Jan 2 20:20:00 CET 2004


Robert Brewer wrote:
> try:
>     return nextHandler(args)
> except (None, Exception)[self.trapErrors], exc:
>     if page == u'-Error':
>         raise exc
           raise # re-raises the same error with the full traceback.
>     else:
>         return self.handle_error(exc, scriptWithPath)




More information about the Python-list mailing list