python类h()的实例源码

dbussy.py 文件源码 项目:dbussy 作者: ldo 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def data_key(data) :
    "returns a unique value that allows data to be used as a dict/set key."
    if isinstance(data, (bytes, float, frozenset, int, str, tuple)) :
        result = data
    else :
        # data itself is non-hashable
        result = id(data)
    #end if
    return \
        result
#end data_key

#+
# Library prototypes
#-

# from dbus-connection.h:


问题


面经


文章

微信
公众号

扫码关注公众号