classification
Title: Docs in Python 3:raise statement mistake
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.2, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Ramchandra Apte, docs@python, python-dev, sandro.tosi, terry.reedy
Priority: normal Keywords: patch

Created on 2011-12-30 15:34 by Ramchandra Apte, last changed 2012-01-01 11:19 by sandro.tosi. This issue is now closed.

Messages (3)
msg150382 - (view) Author: Ramchandra Apte (Ramchandra Apte) * Date: 2011-12-30 15:34
In the Python 3 docs for the raise statement, http://docs.python.org/py3k/reference/simple_stmts.html#the-raise-statement,the docs say "If no exception is active in the current scope, a TypeError exception is raised indicating that this is an error (if running under IDLE, a queue.Empty exception is raised instead).

This is wrong in Python 3 because raise raises a RuntimeError and IDLE does the same (does not raise a queue.Empty Exception).

The text should be "If no exception is active in the current scope, a RuntimeError exception is raised indicating that this is an error."
msg150401 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2011-12-30 22:02
Verified for 3.2.2 cmd window and idle. Fix looks good.
msg150428 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-01-01 11:18
New changeset 420e01156272 by Sandro Tosi in branch '3.2':
Issue #13683: raise with no exception in scope throws a RuntimeError; fix by Ramchandra Apte
http://hg.python.org/cpython/rev/420e01156272
History
Date User Action Args
2012-01-01 11:19:22sandro.tosisetstatus: open -> closed
nosy: + sandro.tosi

resolution: fixed
stage: needs patch -> resolved
2012-01-01 11:18:44python-devsetnosy: + python-dev
messages: + msg150428
2011-12-30 22:02:43terry.reedysettype: behavior
versions: + Python 3.3
keywords: + patch
nosy: + terry.reedy

messages: + msg150401
stage: needs patch
2011-12-30 15:34:14Ramchandra Aptecreate