datastructures.py 文件源码

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

项目:Marty 作者: NaPs 项目源码 文件源码
def msgpack_ext_decoder(code, data):
        """ Decoded used by msgpack deserializer when an ext type is found.

        This hook is basically used to deserialize dates in Arrow objects.
        """
        if code == 1:
            try:
                return arrow.get(data.decode())
            except arrow.parser.ParserError:
                return arrow.Arrow.strptime(data.decode(), '%Y%m%dT%H:%M:%S.%f')
        return msgpack.ExtType(code, data)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号