Utils.py 文件源码

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

项目:SoCFoundationFlow 作者: mattaw 项目源码 文件源码
def h_cmd(ins):
    """
    Task command hashes are calculated by calling this function. The inputs can be
    strings, functions, tuples/lists containing strings/functions
    """
    # this function is not meant to be particularly fast
    if isinstance(ins, str):
        # a command is either a string
        ret = ins
    elif isinstance(ins, list) or isinstance(ins, tuple):
        # or a list of functions/strings
        ret = str([h_cmd(x) for x in ins])
    else:
        # or just a python function
        ret = str(h_fun(ins))
    if sys.hexversion > 0x3000000:
        ret = ret.encode('iso8859-1', 'xmlcharrefreplace')
    return ret
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号