小编Xio*_*ion的帖子

为什么“ requests”使用`with`语句?

我有一个例子:

import requests
with requests.Session() as s:
  s.get('http://python.su/')
Run Code Online (Sandbox Code Playgroud)

是否requests.get使用与本示例相同的结构?

您能给我一些with需要说明的例子吗?

python python-requests

1
推荐指数
1
解决办法
1873
查看次数

标签 统计

python ×1

python-requests ×1