Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b2794c8

Browse files
committed
Issue #13683: raise with no exception in scope throws a RuntimeError; fix by Ramchandra Apte
1 parent 4391173 commit b2794c8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/reference/simple_stmts.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,8 @@ The :keyword:`raise` statement
495495

496496
If no expressions are present, :keyword:`raise` re-raises the last exception
497497
that was active in the current scope. If no exception is active in the current
498-
scope, a :exc:`TypeError` exception is raised indicating that this is an error
499-
(if running under IDLE, a :exc:`queue.Empty` exception is raised instead).
498+
scope, a :exc:`RuntimeError` exception is raised indicating that this is an
499+
error.
500500

501501
Otherwise, :keyword:`raise` evaluates the first expression as the exception
502502
object. It must be either a subclass or an instance of :class:`BaseException`.

0 commit comments

Comments
 (0)