schema.py 文件源码

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

项目:graphql-compiler 作者: kensho-technologies 项目源码 文件源码
def _serialize_datetime(value):
    """Serialize a DateTime object to its proper ISO-8601 representation."""
    if not isinstance(value, (datetime, arrow.Arrow)):
        raise ValueError(u'The received object was not a datetime: '
                         u'{} {}'.format(type(value), value))
    return value.isoformat()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号