address.py 文件源码

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

项目:isthislegit 作者: duo-labs 项目源码 文件源码
def requires_non_ascii(self):
        """
        Can the address be converted to an ASCII compatible encoding?
        """
        if not is_pure_ascii(self.mailbox):
            return True
        if not is_pure_ascii(self.hostname):
            try:
                idna.encode(self.hostname)
            except idna.IDNAError:
                return True
        return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号