Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Hashing tuples
Post: RE: Hashing tuples

(Dec-04-2019, 04:55 AM)Gribouillis Wrote: Can you explain what you want to do? Instead of the hash() function you could perhaps rely directly on dictionaries. Thank you, I just did that. At the end ...
remow News and Discussions 7 130,404 Dec-06-2019, 11:04 PM
    Thread: Hashing tuples
Post: RE: Hashing tuples

(Dec-03-2019, 10:51 PM)Gribouillis Wrote: hash() is meant to be fast in order to implement hash-table-like algorithms. Yes, I liked the fast part and glossed over collisions **wall** Tomorrow I'll ...
remow News and Discussions 7 130,404 Dec-03-2019, 11:19 PM
    Thread: Hashing tuples
Post: RE: Hashing tuples

(Dec-03-2019, 10:36 PM)Gribouillis Wrote: I didn't know that. Hash collisions occur. Why is it a problem for you? Well... I was trying to speed up an algorithm with an ad-hoc data structure, but it ...
remow News and Discussions 7 130,404 Dec-03-2019, 10:45 PM
    Thread: Hashing tuples
Post: Hashing tuples

I just discovered (the bad way) that: hash((-1,0)) == hash((-2,0)) I rewrote the program using: hash(str(tuple)) and got it to work. Has someone a better idea? Thank you! (Using python 3.6.9)
remow News and Discussions 7 130,404 Dec-03-2019, 10:33 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020