diff options
author | Sandro Tosi <sandro.tosi@gmail.com> | 2012-01-01 11:17:15 (GMT) |
---|---|---|
committer | Sandro Tosi <sandro.tosi@gmail.com> | 2012-01-01 11:17:15 (GMT) |
commit | b2794c842f0e35af22387cfc74173d4ac22681b4 (patch) | |
tree | fbe455eaab9acf9aff3bddb0b2250ea218faa022 /Doc/reference | |
parent | 4391173778b834685dec499f9824649ed768299a (diff) | |
download | cpython-b2794c842f0e35af22387cfc74173d4ac22681b4.zip cpython-b2794c842f0e35af22387cfc74173d4ac22681b4.tar.gz cpython-b2794c842f0e35af22387cfc74173d4ac22681b4.tar.bz2 |
Issue #13683: raise with no exception in scope throws a RuntimeError; fix by Ramchandra Apte
Diffstat (limited to 'Doc/reference')
-rw-r--r-- | Doc/reference/simple_stmts.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst index 0bf2127..34ed92f 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`. |