"Bruno Desthuilliers" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
>id(object) -> integer
>Return the identity of an object. This is guaranteed to be unique among
>simultaneously existing objects.
This is part of the language specification. Also, the identity of an
object must
Nomak a écrit :
Hello,
does python have an equivalent to Java: int Object.hashCode() ?
id(object) -> integer
Return the identity of an object. This is guaranteed to be unique among
simultaneously existing objects. (Hint: it's the object's memory address.)
hash(obj) -> integer
Return a hash valu
Bruno Desthuilliers wrote:
hash(obj) -> integer
Return a hash value for the object. Two objects with the same value
have the same hash value. The reverse is not necessarily true, but likely.
Of course not all Python objects are hashable:
>>> hash([])
Traceback (most recent call last):
File "",