Discussions Q&R
OMG! this is, well, Hard!
3 Votes
5 RéponsesIf 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 Votes
2 RéponsesAujourd'hui en vedette
[DISCUSSION] Code Challenges
14 Votes
Guys Pls help
4 Votes
#CREDIT CARD VALIDATOR
0 Votes
Connecting on Discord
2 Votes
Isn’t tuples immutable?
0 Votes
I want to solve the question c#
1 Votes
Python
1 Votes
What is incorrect in this code
0 Votes