Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.029 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'deletion': 0.09; 'reply- to:addr:comp.lang.python': 0.09; 'storing': 0.09; 'to:addr:comp.lang.python': 0.09; 'am,': 0.12; '(key,': 0.16; 'calculating': 0.16; 'parsed': 0.16; 'subject:independent': 0.16; '\xa0to': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; 'of.': 0.18; 'cc:no real name:2**0': 0.20; 'memory': 0.21; 'programming': 0.21; 'mechanism': 0.21; 'result.': 0.21; 'dec': 0.22; 'header:In-Reply-To:1': 0.22; 'pair': 0.23; 'defined': 0.24; 'string': 0.24; 'cc:2**0': 0.24; 'structure': 0.26; 'language.': 0.28; 'retrieval': 0.29; 'cc:addr:python.org': 0.29; 'actions.': 0.30; 'hash': 0.30; 'value)': 0.30; 'chris': 0.30; 'subject:?': 0.31; 'values': 0.32; 'list': 0.32; 'objects': 0.32; 'header:User- Agent:1': 0.33; 'object': 0.33; 'fri,': 0.34; 'from:addr:googlemail.com': 0.34; 'normally': 0.34; 'operations': 0.35; 'list.': 0.35; 'friday,': 0.37; 'but': 0.37; 'run': 0.37; 'received:google.com': 0.37; 'linked': 0.38; 'replace': 0.38; 'some': 0.38; 'received:209.85': 0.38; 'easier': 0.38; 'programming.': 0.39; 'received:209': 0.40; 'might': 0.40; 'management': 0.60; '2011': 0.61; 'kind': 0.61; 'grow': 0.62; 'auto': 0.63; 'further': 0.64; 'collection': 0.69; 'header:Reply- To:1': 0.71; 'reply-to:no real name:2**0': 0.72; 'reply- to:addr:googlegroups.com': 0.74; 'inquiring': 0.84; 'offers.': 0.84; 'them)': 0.84 Newsgroups: comp.lang.python Date: Thu, 1 Dec 2011 20:29:40 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=1.168.133.35; posting-account=5JdMBQoAAABHnS4mjpqEzxnmWtgiiVNw References: <30715729.411.1322753732534.JavaMail.geo-discussion-forums@pret21> <4ED7A2CE.6070306@davea.name> User-Agent: G2/1.0 X-Google-Web-Client: true MIME-Version: 1.0 Subject: Re: order independent hash? From: 88888 Dihedral To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: comp.lang.python@googlegroups.com List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1322800184 news.xs4all.nl 6848 [2001:888:2000:d::a6]:52410 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:16524 On Friday, December 2, 2011 12:18:29 AM UTC+8, Chris Angelico wrote: > On Fri, Dec 2, 2011 at 2:52 AM, Dave Angel wrote: > > On 12/01/2011 10:35 AM, 88888 Dihedral wrote: > >> I knew a hash can replace a bi-directional linked list. > >> The value =A0can be a multi-field string =A0to be parsed for further a= ctions. > >> Is this what you are asking? > > > > A hash is a number, so I don't see how it can replace any kind of linke= d > > list. =A0Perhaps you're thinking of some other language. >=20 > A hashtable is a form of data structure that involves hashing values > (ie calculating hashes for them) and storing them for easier retrieval > than a simple linked list offers. That may be what you're thinking of. >=20 > ChrisA I clear my point a hash is a collection of (key, value) pairs that have well defined methods and behavior to be used in programming.=20 The basic operations of a hash normally includes the following: 1. insertion of a (key, value) pair into the hash 2. deletion of a (key, value) from the hash 3. inquiring a hash by a key to retrieve the value if the (key, value)=20 pair available in the hash. If no key matched, the hash will return=20 a not found result.=20 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 s= ize of (k,v) pairs.=20 Some implementations of a hash might pose some restrictions of k and v for some reasons. But in object programming k and v can be objects to be manipulated by the programmer.