You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
>>> whileTrue:
... try:
... x =int(raw_input("Please enter a number: "))
... break
... exceptValueError:
... print"Oops! That was no valid number. Try again..."
...
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: