[EMAIL PROTECTED] wrote:
> I usually have a function like this:
>
> def get_excinfo_str():
> """return exception stack trace as a string"""
> (exc_type, exc_value, exc_traceback) = sys.exc_info()
The parens here can be skipped:
exc_type, exc_value, exc_traceback = sys.exc_info()
> formatted_excinfo = traceback.format_exception(exc_type, exc_value,
> exc_traceback)
> excinfo_str = "".join(formatted_excinfo)
> del exc_type
> del exc_value
> del exc_traceback
The three del lines above don't do anything (the return decrefs the locals).
> return(excinfo_str)
The parens here can be skipped as well:
return excinfo_str
--
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list