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!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'function,': 0.07; 'python': 0.08; '>>>>': 0.09; 'compute': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'mapped': 0.09; 'message-id:@stoneleaf.us': 0.09; 'received:gator410.hostgator.com': 0.09; 'tuple': 0.09; '~ethan~': 0.09; 'am,': 0.12; 'algorithm': 0.13; 'stored': 0.13; 'accesses': 0.16; 'hashable': 0.16; 'implemented.': 0.16; 'received:72.11': 0.16; 'received:72.11.125': 0.16; 'received:72.11.125.166': 0.16; 'subject:independent': 0.16; 'meant': 0.17; 'wrote:': 0.18; '>>>': 0.18; 'ryan': 0.18; 'position,': 0.19; "haven't": 0.20; 'trying': 0.21; 'dec': 0.22; 'header:In-Reply-To:1': 0.22; 'dictionary': 0.23; 'pair': 0.23; 'table.': 0.23; "python's": 0.24; 'tree': 0.25; 'function': 0.27; 'work.': 0.28; "he's": 0.29; 'pm,': 0.29; 'hash': 0.30; 'objects.': 0.30; 'oop': 0.30; 'sun,': 0.30; 'subject:?': 0.31; 'values': 0.32; 'list': 0.32; 'objects': 0.32; 'idea': 0.32; 'header:User-Agent:1': 0.33; 'this.': 0.33; 'there': 0.33; 'done': 0.34; 'to:addr:python-list': 0.34; 'all.': 0.34; 'convince': 0.34; 'lie': 0.34; 'then.': 0.34; 'list.': 0.35; 'something': 0.35; 'sets': 0.35; 'explain': 0.36; 'but': 0.37; 'think': 0.37; 'maps': 0.38; 'monday,': 0.38; 'replace': 0.38; 'some': 0.38; 'tables': 0.39; 'why': 0.39; 'called': 0.40; 'to:addr:python.org': 0.40; 'more': 0.61; 'type': 0.61; '2011': 0.61; 'power': 0.63; 'received:websitewelcome.com': 0.64; 'received:184': 0.67; 'stated': 0.68; 'received:gateway16.websitewelcome.com': 0.84; 'sets,': 0.84; 'talk,': 0.91 Date: Sun, 04 Dec 2011 18:08:01 -0800 From: Ethan Furman User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: python-list@python.org Subject: Re: order independent hash? References: <30715729.411.1322753732534.JavaMail.geo-discussion-forums@pret21> <4ED7A2CE.6070306@davea.name> <6366868.86.1322800180523.JavaMail.geo-discussion-forums@pret21> <3MKCq.194015$th7.47228@newsfe07.ams2> <26969335.380.1323013143216.JavaMail.geo-discussion-forums@prnu18> <27797359.1293.1323021983756.JavaMail.geo-discussion-forums@prfb10> <12469565.1384.1323040641935.JavaMail.geo-discussion-forums@prfj18> <22840051.509.1323046334160.JavaMail.geo-discussion-forums@prnu18> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator410.hostgator.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stoneleaf.us X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: mail.admailinc.com ([192.168.10.136]) [72.11.125.166]:1283 X-Source-Auth: ethan+stoneleaf.us X-Email-Count: 1 X-Source-Cap: dG9idWs7dG9idWs7Z2F0b3I0MTAuaG9zdGdhdG9yLmNvbQ== X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 39 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1323052483 news.xs4all.nl 6882 [2001:888:2000:d::a6]:36053 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:16637 Lie Ryan wrote: > On 12/05/2011 11:52 AM, 88888 Dihedral wrote: >> On Monday, December 5, 2011 7:24:49 AM UTC+8, Ian wrote: >>> On Sun, Dec 4, 2011 at 4:17 PM, 88888 Dihedral >>> wrote: >>>>> Please explain what you think a hash function is, then. Per >>>>> Wikipedia, "A hash function is any algorithm or subroutine that maps >>>>> large data sets to smaller data sets, called keys." >>>>> >>>>>> Are you miss-leading the power of true OOP ? >>>>> >>>>> I have no idea what you are suggesting. I was not talking about >>>>> OOP at all. >>>> >>>> In python the (k,v) pair in a dictionary k and v can be both an >>>> objects. >>>> v can be a tuple or a list. There are some restrictions on k to be an >>>> hashable type in python's implementation. The key is used to >>>> compute the position of the pair to be stored in a hash table. The >>>> hash function maps key k to the position in the hash table. If >>>> k1!=k2 are both mapped to the same >>>> position, then something has to be done to resolve this. >>> >>> I understand how dicts / hash tables work. I don't need you to >>> explain that to me. What you haven't explained is why you stated that >>> a hash function that operates on objects is not a hash function, or >>> what you meant by "misleading the power of true OOP". >> >> If v is a tuple or a list then a dictionary in python can replace a >> bi-directional list or a tree under the assumption that the hash >> which accesses values stored in a much faster way when well >> implemented. > > trying not to be rude, but the more you talk, the more I"m convince that > you're trolling. Welcome to my killfile. I think he's a bot, and he's been in my killfile for a while now. ~Ethan~