实现了一个新的sys.atexit函数,用于注册函数后在主脚本结束时执行。它可以通过配置MICROPY_PY_SYS_ATEXIT,默认情况下禁用。
它与CPython不兼容,而是可以根据需要用于实现CPython兼容的“atexit”模块(类似于sys.print_exception 如何用于实现“traceback”模块的功能)。
https://github.com/micropython/micropyt ... 0828369bd3
mpy增加新的sys.atexit功能
-
- 随机主题
- 回复总数
- 阅读次数
- 最新文章
-
- 1回复总数
- 1163 阅读次数
- 最新文章 由 shaoziyang
2021年 3月 3日 11:00
-
- 9回复总数
- 2193 阅读次数
- 最新文章 由 slotg
2021年 3月 4日 14:04
-
- 1回复总数
- 1032 阅读次数
- 最新文章 由 shaoziyang
2021年 3月 4日 11:14