application.py 文件源码

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

项目:birdnet 作者: cyysu 项目源码 文件源码
def _match(self, mapping, value):
        for pat, what in utils.group(mapping, 2):
            if isinstance(what, application):
                if value.startswith(pat):
                    f = lambda: self._delegate_sub_application(pat, what)
                    return f, None
                else:
                    continue
            elif isinstance(what, basestring):
                what, result = utils.re_subm('^' + pat + '$', what, value)
            else:
                result = utils.re_compile('^' + pat + '$').match(value)

            if result: # it's a match
                return what, [x and urllib.unquote(x) for x in result.groups()]
        return None, None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号