F&A Diskussionen
OMG! this is, well, Hard!
3 Stimmen
5 Antworten[SOLVED] Problem w/ RobotBarman
-2 Stimmen
2 AntwortenIf except can handle common errors very well, doesn't that make the use of raise redundant inside of a try-except block?
For example:
try:
print( 5 / 0 )
except ZeroDivisionError:
raise ValueError("An error occurred!")
What's the difference if we handle it this way:
try:
print( 5 / 0 )
except (ZeroDivisionError, ValueError):
print("An error occurred!")
3 Stimmen
2 AntwortenHeute heiß
I am new
1 Votes
Advertising in Sololearn
1 Votes
Marquee
1 Votes
RUST'S FUTURE
1 Votes
Any Advise?
1 Votes