F&A Diskussionen
how the last one will become 3???
2 Stimmen
4 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 AntwortenCan you help me in this code?
-4 Stimmen
9 AntwortenHeute heiß
Using Python on VScode
2 Votes
Python Developer
0 Votes
Hearts
1 Votes
Wayss
0 Votes
fully dynamic arrays
1 Votes
Guys who tell me
0 Votes
Question
0 Votes