Commit b2794c84 authored by Sandro Tosi's avatar Sandro Tosi

Issue #13683: raise with no exception in scope throws a RuntimeError; fix by Ramchandra Apte

parent 43911737
...@@ -495,8 +495,8 @@ The :keyword:`raise` statement ...@@ -495,8 +495,8 @@ The :keyword:`raise` statement
If no expressions are present, :keyword:`raise` re-raises the last exception 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 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 scope, a :exc:`RuntimeError` exception is raised indicating that this is an
(if running under IDLE, a :exc:`queue.Empty` exception is raised instead). error.
Otherwise, :keyword:`raise` evaluates the first expression as the exception Otherwise, :keyword:`raise` evaluates the first expression as the exception
object. It must be either a subclass or an instance of :class:`BaseException`. object. It must be either a subclass or an instance of :class:`BaseException`.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment