python关键字“with”用于什么?
例子来自:http:/docs.python.org/教程/inputoutput.html
>>> with open('/tmp/workfile', 'r') as f:... read_data = f.read()>>> f.closedTrue
相关分类