pokeslack.py 文件源码

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

项目:PokemonGo-SlackBot 作者: rubenmak 项目源码 文件源码
def merge(x,y):
    # store a copy of x, but overwrite with y's values where applicable
    merged = dict(x,**y)

    xkeys = x.keys()

    # if the value of merged[key] was overwritten with y[key]'s value
    # then we need to put back any missing x[key] values
    for key in xkeys:
        # if this key is a dictionary, recurse
        if type(x[key]) is types.DictType and y.has_key(key):
            merged[key] = merge(x[key],y[key])

    return merged
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号