regex.py 文件源码

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

项目:hachoir3 作者: vstinner 项目源码 文件源码
def __or__(self, other):
        """
        Public method of OR operator: a|b. It call or_() internal method.
        If or_() returns None: RegexOr object is used (and otherwise,
        use or_() result).
        """
        # Try to optimize (a|b)
        new_regex = self.or_(other)
        if new_regex:
            return new_regex

        # Else use (a|b)
        return RegexOr((self, other))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号