From: Sandro Tosi Date: Sun, 1 Jan 2012 11:17:15 +0000 (+0100) Subject: Issue #13683: raise with no exception in scope throws a RuntimeError; fix by Ramchand... X-Git-Tag: v3.2.3rc1~225 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b2794c842f0e35af22387cfc74173d4ac22681b4;p=thirdparty%2FPython%2Fcpython.git Issue #13683: raise with no exception in scope throws a RuntimeError; fix by Ramchandra Apte --- diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst index 0bf21276ea9e..34ed92fc7ab9 100644 --- a/Doc/reference/simple_stmts.rst +++ b/Doc/reference/simple_stmts.rst @@ -495,8 +495,8 @@ The :keyword:`raise` statement If no expressions are present, :keyword:`raise` re-raises the last exception that was active in the current scope. If no exception is active in the current -scope, a :exc:`TypeError` exception is raised indicating that this is an error -(if running under IDLE, a :exc:`queue.Empty` exception is raised instead). +scope, a :exc:`RuntimeError` exception is raised indicating that this is an +error. Otherwise, :keyword:`raise` evaluates the first expression as the exception object. It must be either a subclass or an instance of :class:`BaseException`.