"Daniel 'eikeon' Krech" <eikeon@eikeon.com> writes: > Sorry, seems to me like it was on topic for python-dev seeing as > python dictionaries do not currently have the functionality I > desire. It sure is possible. You have been essentially asking the question "How do I get the canonical member of an equivalence class in Python", for which the canonical answer is "you intern the one member of each equivalence class". As Barry Scott explains, this is best done with an interning dictionary. You are also asking "how do I efficiently implement sets in Python". This is almost a FAQ, the answer is "if the elements are hashable, use a dictionary". Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4