Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!goblin1!goblin2!goblin.stu.neva.ru!news-hub.siol.net!newsfeed.t-com.hr!garrison.bnet.hr!gregory.BNet.hr!busola.homelinux.net!not-for-mail From: Hrvoje Niksic Newsgroups: comp.lang.python Subject: Re: order independent hash? Date: Fri, 02 Dec 2011 10:53:47 +0100 Organization: B.net Hrvatska d.o.o. Lines: 16 Message-ID: <87k46fb8pg.fsf@xemacs.org> References: <30715729.411.1322753732534.JavaMail.geo-discussion-forums@pret21> <4ED7A2CE.6070306@davea.name> <6366868.86.1322800180523.JavaMail.geo-discussion-forums@pret21> NNTP-Posting-Host: cpe-94-253-185-189.zg.cable.xnet.hr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: gregory.bnet.hr 1322820001 20774 94.253.185.189 (2 Dec 2011 10:00:01 GMT) X-Complaints-To: abuse@globalnet.hr NNTP-Posting-Date: Fri, 2 Dec 2011 10:00:01 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:UXG8CvUxzwp/h1VeXNkEy2o6Esk= Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:16536 Chris Angelico 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.