order independent hash?
Hrvoje Niksic
hniksic at xemacs.org
Fri Dec 2 04:53:47 EST 2011
Chris Angelico <rosuav at gmail.com> writes:
>> The hash can grow with (k,v) pairs accumulated in the run time.
>> An auto memory management mechanism is required for a hash of a non-fixed size of (k,v) pairs.
>
> That's a hash table
In many contexts "hash table" is shortened to "hash" when there is no
ambiguity. This is especially popular among Perl programmers where the
equivalent of dict is called a hash.
> Although strictly speaking, isn't that "Python dicts are implemented
> as hash tables in CPython"? Or is the hashtable implementation
> mandated?
It's pretty much mandated because of the __hash__ protocol.
More information about the Python-list
mailing list