make_stub_files.py 文件源码

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

项目:dotfiles 作者: zchee 项目源码 文件源码
def all_matches(self, s):
        '''
        Return a list of match objects for all matches in s.
        These are regex match objects or (start, end) for balanced searches.
        '''
        trace = False
        if self.is_balanced():
            aList, i = [], 0
            while i < len(s):
                progress = i
                j = self.full_balanced_match(s, i)
                if j is None:
                    i += 1
                else:
                    aList.append((i,j),)
                    i = j
                assert progress < i
            return aList
        else:
            return list(self.regex.finditer(s))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号