def formatExceptionInfo():
 (cla, exc) = sys.exc_info()[:2]
 return (cla.__name__, str(exc))

def formatExceptionInfo ( ) : ( cla , exc ) = sys . exc_info ( ) [ : 2 ] return ( cla . __name__ , str ( exc ) )
consistently format exception information .