python关键字"with“是用来做什么的?
示例来自:http://docs.python.org/tutorial/inputoutput.html
>>> with open('/tmp/workfile', 'r') as f: ... read_data = f.read() >>> f.closed True
https://stackoverflow.com/questions/1369526
相似问题