keymaps.py 文件源码

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

项目:bittyband 作者: yam655 项目源码 文件源码
def expand_unicode(s):
    """ Convert unicode reference in to a Unicode string. """
    if s.startswith(r'\u') or s.startswith(r'\U'):
        return chr(int(s,16))
    if s.startswith(r'\N{'):
        name = s[3:-1]
        try:
            return unicodedata.lookup(name)
        except:
            raise ConfigError("Failed to find unicode value with name {}\n".format(name))
    else:
        return s
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号