elements.py 文件源码

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

项目:zpretty 作者: collective 项目源码 文件源码
def is_text(self):
        ''' Check if this element is a text

        Also comments and processing instructions
        are instances of NavigableString,
        so we have to make additional checks
        '''
        if not isinstance(self.context, NavigableString):
            return False
        if (
            self.is_comment() or
            self.is_doctype() or
            self.is_processing_instruction()
        ):
            return False
        return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号