Message323065
A "while-except" loop, in which it acts like a do-while loop from other languages, except the condition is "did an exception occur during the execution of the iteration". One could specify a type of exception at the top, similar to an except block header. (sorry, I'm an idiot)
Example (the keyword might be different):
# asks for a number until the user gives one properly, then
# calculates the square of it.
whexc ValueError:
num = int(input("Enter a number: "))
print("The square of your number is " + str(num * num)) # assuming whexc works, this will not cause an error |
|
Date |
User |
Action |
Args |
2018-08-03 19:28:12 | Happy Fakeboulder | set | recipients:
+ Happy Fakeboulder |
2018-08-03 19:28:12 | Happy Fakeboulder | set | messageid: <1533324492.86.0.56676864532.issue34332@psf.upfronthosting.co.za> |
2018-08-03 19:28:12 | Happy Fakeboulder | link | issue34332 messages |
2018-08-03 19:28:12 | Happy Fakeboulder | create | |
|