Christoph Zwerschke <[EMAIL PROTECTED]> writes:
> Mike Meyer wrote:
>> Christoph Zwerschke wrote:
>>>I think that is not so bad. How about this simplification:
>>>
>>>Any hashable object(1) can be used as a dictionary key/set
>>>element. Lists, sets and dicts are not hashable, and can not be
>>>us
Mike Meyer wrote:
> Christoph Zwerschke wrote:
>>I think that is not so bad. How about this simplification:
>>
>>Any hashable object(1) can be used as a dictionary key/set
>>element. Lists, sets and dicts are not hashable, and can not be
>>used. Tuples can be used if all the things they contain are
Christoph Zwerschke <[EMAIL PROTECTED]> writes:
> Mike Meyer wrote:
>> Any object for which hash() returns an appropriate value(1) can be
>> used as a dictionary key/set element. Lists, sets and dicts are not
>> hashable, and can not be used. Tuples can be used if all the things
>> they contain are
Mike Meyer wrote:
> Any object for which hash() returns an appropriate value(1) can be
> used as a dictionary key/set element. Lists, sets and dicts are not
> hashable, and can not be used. Tuples can be used if all the things
> they contain are hashable. instances of all other builin types can be
"Martin v. Löwis" <[EMAIL PROTECTED]> writes:
> Me, personally, I had your definition in mind: hashable should indicate
> "returns a value constant over time and consistent with comparison".
>
> I suggested that most people would consider "hashable" to mean:
> hash() returns a value. To those peopl
Mike Meyer wrote:
>>>Personally, I think we'd be better off to come up with a term for this
>>>property that doesn't have a commonly understood meaning that has such
>>>broad areas of disagreement with the property. I've been using
>>>"hashable", which I would currently define as "has a __hash__ me
"Martin v. Löwis" <[EMAIL PROTECTED]> writes:
> Mike Meyer wrote:
>> Personally, I think we'd be better off to come up with a term for this
>> property that doesn't have a commonly understood meaning that has such
>> broad areas of disagreement with the property. I've been using
>> "hashable", whic
Mike Meyer wrote:
> Personally, I think we'd be better off to come up with a term for this
> property that doesn't have a commonly understood meaning that has such
> broad areas of disagreement with the property. I've been using
> "hashable", which I would currently define as "has a __hash__ method
"Martin v. Löwis" <[EMAIL PROTECTED]> writes:
> Mike Meyer wrote:
>>>This is not true. The second definition of __hash__ does not meet
>>>the specifications:
>> The specification isn't on the __hash__ method, but on objects.
> What does it mean for a specification to be "on" something? The
> specif