Help on Dict
Hendrik van Rooyen
mail at microcorp.co.za
Mon Feb 26 00:15:43 EST 2007
"James Stroud" <jstroud at mbi.ucla.edu> wrote:
> Clement wrote:
> > Can any body tell how Dict is implemented in python... plz tell what
> > datastructure that uses................
> >
>
> I think it uses a dict.
"Groan!" - this answer is like Microsoft documentation -
while technically correct, it is useless... : - )
The key of a dict entry is subjected to a bit of magic called
a "Hashing algorithm" that yields a "bin" in which the data
is kept.
So to get hold of a dict entry always takes a similar time.
And its the quickest form of random access based on
a non integer key that you can get.
hth - Hendrik
More information about the Python-list
mailing list