_regex_core.py 文件源码

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

项目:oa_qian 作者: sunqb 项目源码 文件源码
def at_end(self):
        string = self.string
        pos = self.pos

        try:
            if self.ignore_space:
                while True:
                    if string[pos].isspace():
                        pos += 1
                    elif string[pos] == "#":
                        pos = string.index("\n", pos)
                    else:
                        break

            return pos >= len(string)
        except IndexError:
            # We've reached the end of the string.
            return True
        except ValueError:
            # The comment extended to the end of the string.
            return True
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号