摘要:
Python的with这个关键字用来对context进行管理 进入的时候自动持有 出去的时候自动释放 class MyContextManager: def __enter__(self): print('1. entering') # 返回给 as 关键字 return self def __ex 阅读全文
posted @ 2024-02-26 20:56
sqmw
阅读(10)
评论(0)
推荐(0)
浙公网安备 33010602011771号