micropython/tests/basics/int-divzero.py
Paul Sokolovsky 6ded55a61f py: Properly implement divide-by-zero handling.
"1/0" is sacred idiom, the shortest way to break program execution
(sys.exit() is too long).
2014-03-31 02:23:57 +03:00

10 lines
146 B
Python

try:
1 / 0
except ZeroDivisionError:
print("ZeroDivisionError")
try:
1 // 0
except ZeroDivisionError:
print("ZeroDivisionError")