testing.py 文件源码

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

项目:modern-paste 作者: LINKIWI 项目源码 文件源码
def random_or_specified_value(cls, value):
        """
        Helper utility for choosing between a user-specified value for a field or a randomly generated value.

        :param value: Either a lambda type or a non-lambda type.
        :return: The value itself if not a lambda type, otherwise the value of the evaluated lambda (random value)
        """
        return value() if isinstance(value, types.LambdaType) else value
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号