Possible Duplicate:
How are Python’s Built In Dictionaries Implemented
I am fairly new to python and have a background in java. I was wondering whether the dictionary in python has the same search complexity as for hash maps in java. Example: searching for a key in a hash table/map in java is a constant time operation, I was wondering whether searching for a key in a dictionary in python is also a constant time operation. I have read through a few pages of python documentation regarding mapping but it doesn't seem to indicate any hashing of keys of dictionary in python so I was wondering whether:
- searching keys in a dictionary in python was constant time operation.
- If so how do they achieve this constant time search without hashing?