utils.py 文件源码

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

项目:girder_worker 作者: girder 项目源码 文件源码
def __init__(self, output_spec, key, dictionary=None):
        """
        Appends all data from a stream under a key inside a dict. Can be used
        to bind traditional (non-streaming) outputs to pipes when using
        ``run_process``.

        :param output_spec: The output specification.
        :type output_spec: dict
        :param key: The key to accumulate the data under.
        :type key: hashable
        :param dictionary: Dictionary to write into. If not specified, uses the
            output_spec.
        :type dictionary: dict
        """
        super(AccumulateDictAdapter, self).__init__(output_spec)

        if dictionary is None:
            dictionary = output_spec

        if key not in dictionary:
            dictionary[key] = ''

        self.dictionary = dictionary
        self.key = key
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号