Q&A DiscussÔes
try-except & Boolean
1 Voto
3 RespostasPython
0 Voto
5 RespostasIf 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 Votos
2 RespostasQuente hoje
Mobile number and similarity
0 Votes
GitHub account connecting issue
3 Votes
photo upload issue in html code
0 Votes
Coding issue
2 Votes
Loops and conditions
0 Votes
how to creat database?
1 Votes