condition.py 文件源码

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

项目:python-sdk 作者: optimizely 项目源码 文件源码
def object_hook(self, object_dict):
    """ Hook which when passed into a json.JSONDecoder will replace each dict
    in a json string with its index and convert the dict to an object as defined
    by the passed in condition_decoder. The newly created condition object is
    appended to the conditions_list.

    Args:
      object_dict: Dict representing an object.

    Returns:
      An index which will be used as the placeholder in the condition_structure
    """
    instance = self.decoder(object_dict)
    self.condition_list.append(instance)
    self.index += 1
    return self.index
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号