facade.py 文件源码

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

项目:python-libjuju 作者: juju 项目源码 文件源码
def retspec(defs):
    # return specs
    # only return 1, so if there is more than one type
    # we need to include a union
    # In truth there is only 1 return
    # Error or the expected Type
    if not defs:
        return None
    if defs in basic_types:
        return strcast(defs, False)
    rtypes = _registry.getObj(_types[defs])
    if not rtypes:
        return None
    if len(rtypes) > 1:
        return Union[tuple([strcast(r[1], True) for r in rtypes])]
    return strcast(rtypes[0][1], False)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号