Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs in Python 3:raise statement mistake #57892

Closed
RamchandraApte mannequin opened this issue Dec 30, 2011 · 3 comments
Closed

Docs in Python 3:raise statement mistake #57892

RamchandraApte mannequin opened this issue Dec 30, 2011 · 3 comments
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@RamchandraApte
Copy link
Mannequin

RamchandraApte mannequin commented Dec 30, 2011

BPO 13683
Nosy @terryjreedy, @sandrotosi

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2012-01-01.11:19:22.535>
created_at = <Date 2011-12-30.15:34:14.092>
labels = ['type-bug', 'docs']
title = 'Docs in Python 3:raise statement mistake'
updated_at = <Date 2012-01-01.11:19:22.523>
user = 'https://bugs.python.org/RamchandraApte'

bugs.python.org fields:

activity = <Date 2012-01-01.11:19:22.523>
actor = 'sandro.tosi'
assignee = 'docs@python'
closed = True
closed_date = <Date 2012-01-01.11:19:22.535>
closer = 'sandro.tosi'
components = ['Documentation']
creation = <Date 2011-12-30.15:34:14.092>
creator = 'Ramchandra Apte'
dependencies = []
files = []
hgrepos = []
issue_num = 13683
keywords = ['patch']
message_count = 3.0
messages = ['150382', '150401', '150428']
nosy_count = 5.0
nosy_names = ['terry.reedy', 'sandro.tosi', 'docs@python', 'python-dev', 'Ramchandra Apte']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue13683'
versions = ['Python 3.2', 'Python 3.3']

@RamchandraApte
Copy link
Mannequin Author

RamchandraApte mannequin commented Dec 30, 2011

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."

@RamchandraApte RamchandraApte mannequin added the docs Documentation in the Doc dir label Dec 30, 2011
@terryjreedy
Copy link
Member

Verified for 3.2.2 cmd window and idle. Fix looks good.

@terryjreedy terryjreedy added the type-bug An unexpected behavior, bug, or error label Dec 30, 2011
@python-dev
Copy link
Mannequin

python-dev mannequin commented Jan 1, 2012

New changeset 420e01156272 by Sandro Tosi in branch '3.2':
Issue bpo-13683: raise with no exception in scope throws a RuntimeError; fix by Ramchandra Apte
http://hg.python.org/cpython/rev/420e01156272

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants