Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtisQ&A DiscussƵes
If 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
Bits
6 Votes
How to cast in python : 2
2 Votes
Polyalphabetic Cipher
0 Votes
Why didn't I get it?
1 Votes
Adding a photo
1 Votes
Access deny problem
0 Votes
Help
0 Votes