path.py 文件源码

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

项目:ome-model 作者: ome 项目源码 文件源码
def as_scalar(value):
    """Convert value to a scalar. If a single element Attrs() object is passed
    the value of the single attribute will be returned."""
    if isinstance(value, Attrs):
        assert len(value) == 1
        return value[0][1]
    else:
        return value
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号