摘要: 1.with语句的原理: 1.1with是对类进行操作,必须包括以下三个函数 1.1.1 def __enter__(self):return self 必须返回自己 1.1.2 def __exit__(self, exc_type, exc_val, exc_tb):关闭类之前做的操作 1.1. 阅读全文
posted @ 2021-10-07 21:33 3ξ 阅读(389) 评论(0) 推荐(0) 编辑