摘要: 1,with as,帮助处理异常以及该完成的事情,具体原理是with 会进入一个__enter__, 在__exit__: ex: with open(path) as file: print file.read()很方便。2,raise 显示抛出异常,抛出后不再往下运行。... 阅读全文
posted @ 2015-12-23 10:31 DXAndLIGHT 阅读(227) 评论(0) 推荐(0) 编辑