python from contexts import contextmanager @contextmanager def my_context(): setup_context() try: yield finally: cleanup_context() python with my_context(): do_something()


上一篇:
下一篇:
切换中文