Re: Any built-in ishashable method ?

Discussion in 'Python' started by Jean-Michel Pichavant, Jan 18, 2013.

  1. > The flaw would be key1 == key2 and hash(key1) != hash(key2). Then the
    > set/dict could store equal items multiple times in different places
    > (unless it did a linear search of all members, which would make
    > hashing
    > pointless!).
    >
    > --
    > Terry Jan Reedy


    My understanding of a hash function was wrong in the first place.
    Thank to this thread, I think I got it right now.

    Thanks to all who have contributed, (and those who haven't, yes, I'm in a good mood now).

    JM


    -- IMPORTANT NOTICE:

    The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
    Jean-Michel Pichavant, Jan 18, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave Angel

    Re: Any built-in ishashable method ?

    Dave Angel, Jan 18, 2013, in forum: Python
    Replies:
    0
    Views:
    124
    Dave Angel
    Jan 18, 2013
  2. Peter Otten

    Re: Any built-in ishashable method ?

    Peter Otten, Jan 18, 2013, in forum: Python
    Replies:
    0
    Views:
    129
    Peter Otten
    Jan 18, 2013
  3. Terry Reedy

    Re: Any built-in ishashable method ?

    Terry Reedy, Jan 18, 2013, in forum: Python
    Replies:
    0
    Views:
    124
    Terry Reedy
    Jan 18, 2013
  4. Peter Otten

    Re: Any built-in ishashable method ?

    Peter Otten, Jan 18, 2013, in forum: Python
    Replies:
    0
    Views:
    125
    Peter Otten
    Jan 18, 2013
  5. Steven D'Aprano

    Re: Any built-in ishashable method ?

    Steven D'Aprano, Jan 18, 2013, in forum: Python
    Replies:
    0
    Views:
    132
    Steven D'Aprano
    Jan 18, 2013
Loading...

Share This Page