_codecs.py 文件源码

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

项目:ouroboros 作者: pybee 项目源码 文件源码
def lookup(encoding):
    """lookup(encoding) -> CodecInfo    
    Looks up a codec tuple in the Python codec registry and returns
    a CodecInfo object."""

    if encoding in ('utf-8', 'utf_8'):
       from javascript import console
       console.log('encoding', encoding)
       import encodings.utf_8
       return encodings.utf_8.getregentry()

    LookupError(encoding)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号