On 5 Jun 2002, Daniel 'eikeon' Krech wrote: > > Is there or could there be an efficient way to get an existing key from > a dictionary given a key that is == but whose id is not. For example: If i understand you correctly, a good way to solve this problem is to provide a __hash__ method on the objects that you are using as keys to your dictionary. Dictionaries look up keys by hash equality. Note that you will have to ensure that the keys are immutable (i.e. once they are put in the dictionary, they should never change). -- ?!ng
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