string.py 文件源码

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

项目:filters 作者: eflglobal 项目源码 文件源码
def __init__(self, pattern):
        # type: (Union[Text, regex._pattern_type, re._pattern_type]) -> None
        """
        :param pattern:
            String pattern, or pre-compiled regex.

            IMPORTANT:  If you specify your own compiled regex, be sure to
            add the ``UNICODE`` flag for Unicode support!
        """
        super(Regex, self).__init__()

        self.regex = (
            pattern
                if isinstance(pattern, (regex._pattern_type, re._pattern_type))
                else regex.compile(pattern, regex.UNICODE)
        )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号