Navigation Menu

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

Python 2.5 Documentation error in Tutorial section 8.3 #47204

Closed
dcw303 mannequin opened this issue May 24, 2008 · 3 comments
Closed

Python 2.5 Documentation error in Tutorial section 8.3 #47204

dcw303 mannequin opened this issue May 24, 2008 · 3 comments
Assignees
Labels
docs Documentation in the Doc dir

Comments

@dcw303
Copy link
Mannequin

dcw303 mannequin commented May 24, 2008

BPO 2955
Nosy @birkenfeld, @amauryfa

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 = 'https://github.com/birkenfeld'
closed_at = <Date 2008-05-24.13:00:15.160>
created_at = <Date 2008-05-24.03:08:10.553>
labels = ['docs']
title = 'Python 2.5 Documentation error in Tutorial section 8.3'
updated_at = <Date 2008-05-24.13:00:15.140>
user = 'https://bugs.python.org/dcw303'

bugs.python.org fields:

activity = <Date 2008-05-24.13:00:15.140>
actor = 'georg.brandl'
assignee = 'georg.brandl'
closed = True
closed_date = <Date 2008-05-24.13:00:15.160>
closer = 'georg.brandl'
components = ['Documentation']
creation = <Date 2008-05-24.03:08:10.553>
creator = 'dcw303'
dependencies = []
files = []
hgrepos = []
issue_num = 2955
keywords = []
message_count = 3.0
messages = ['67281', '67294', '67298']
nosy_count = 3.0
nosy_names = ['georg.brandl', 'amaury.forgeotdarc', 'dcw303']
pr_nums = []
priority = 'normal'
resolution = 'works for me'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue2955'
versions = ['Python 2.5']

@dcw303
Copy link
Mannequin Author

dcw303 mannequin commented May 24, 2008

The code sample in Tutorial section 8.3 (Handling Exceptions) doesn't
match the description. Removing the "break" line from the code sample
would make the sample perform according to the description. Found in the
windows doc\python25.chm file.

Original text is below:


It is possible to write programs that handle selected exceptions. Look
at the following example, which asks the user for input until a valid
integer has been entered, but allows the user to interrupt the program
(using Control-C or whatever the operating system supports); note that a
user-generated interruption is signalled by raising the
KeyboardInterrupt exception.

>>> while True:
...     try:
...         x = int(raw_input("Please enter a number: "))
...         break
...     except ValueError:
...         print "Oops!  That was no valid number.  Try again..."
...

@dcw303 dcw303 mannequin assigned birkenfeld May 24, 2008
@dcw303 dcw303 mannequin added the docs Documentation in the Doc dir label May 24, 2008
@amauryfa
Copy link
Member

What makes you think that the code does not match the description?

@birkenfeld
Copy link
Member

Closing as "works for me".

@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
Projects
None yet
Development

No branches or pull requests

2 participants