name.py 文件源码

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

项目:Infrax-as-Code-1000-webservers-in-40-minutes 作者: ezeeetm 项目源码 文件源码
def encode(self, label):
        if label == '':
            return b''
        if self.allow_pure_ascii and self.is_all_ascii(label):
            return label.encode('ascii')
        if not have_idna_2008:
            raise NoIDNA2008
        try:
            if self.uts_46:
                label = idna.uts46_remap(label, False, self.transitional)
            return idna.alabel(label)
        except idna.IDNAError as e:
            raise IDNAException(idna_exception=e)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号