Files
RustPython/examples/atexit_example.py
Jan Krecke a442056e24 changed unraisable exception type to base exception
- print exception type to screen to match cpython behaviour
- included sample script to illustrate behaviour at sys.exit()
2022-12-25 13:58:15 +09:00

8 lines
81 B
Python

import atexit
import sys
def myexit():
sys.exit(2)
atexit.register(myexit)