__init__.py 文件源码

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

项目:yarl 作者: aio-libs 项目源码 文件源码
def with_query(self, *args, **kwargs):
        """Return a new URL with query part replaced.

        Accepts any Mapping (e.g. dict, multidict.MultiDict instances)
        or str, autoencode the argument if needed.

        It also can take an arbitrary number of keyword arguments.

        Clear query if None is passed.

        """
        # N.B. doesn't cleanup query/fragment

        new_query = self._get_str_query(*args, **kwargs)
        return URL(
            self._val._replace(path=self._val.path, query=new_query),
            encoded=True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号