我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用types.h()。
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: