__init__.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:deb-python-requests-unixsocket 作者: openstack 项目源码 文件源码
def __init__(self, url_scheme=DEFAULT_SCHEME):
        self.session = Session()
        requests = self._get_global_requests_module()

        # Methods to replace
        self.methods = ('request', 'get', 'head', 'post',
                        'patch', 'put', 'delete', 'options')
        # Store the original methods
        self.orig_methods = dict(
            (m, requests.__dict__[m]) for m in self.methods)
        # Monkey patch
        g = globals()
        for m in self.methods:
            requests.__dict__[m] = g[m]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号