generate.py 文件源码

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

项目:dustbunny 作者: Teamworksapp 项目源码 文件源码
def with_relative_values_for(self, **kwargs):
        """
        Use relative values for the given set of attributes.

        :param kwargs (attr_name -> function): A mapping of attibute names to functions of a single dictionary argument
            containing all values already set for any given record so far.  Fixed, random, and "extra" values. The 
            function should return the value you wnat to use for the attribute for that record.

        :return: Generate
        """
        ret = copy.copy(self)
        ret.relative_values = copy.copy(ret.relative_values)
        ret.relative_values.append(kwargs)
        return ret
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号