摘要: from contextlib import contextmanager class Test(object): pass ctx = Test() @contextmanager def do_with_log(log_file_path): try: ctx.log = open(log_fi 阅读全文
posted @ 2020-07-13 11:16 GhostAnt 阅读(129) 评论(0) 推荐(0) 编辑