Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #16501
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <d@davea.name> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.042 |
| X-Spam-Evidence | '*H*': 0.92; '*S*': 0.00; 'args': 0.05; 'python': 0.08; 'am,': 0.12; 'wednesday,': 0.15; 'enough?': 0.16; 'ideas?': 0.16; 'parsed': 0.16; 'received:192.168.1.104': 0.16; 'subject:independent': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; '>>>': 0.18; 'cc:no real name:2**0': 0.20; 'header :In-Reply-To:1': 0.22; 'differ': 0.23; 'string': 0.24; 'command': 0.24; 'language.': 0.28; 'lists': 0.28; 'cc:addr:python.org': 0.29; 'actions.': 0.30; 'hash': 0.30; 'subject:?': 0.31; 'list': 0.32; 'header:User-Agent:1': 0.33; 'duplicate': 0.34; 'typical': 0.34; 'list.': 0.35; 'equal': 0.36; 'cc:2**1': 0.36; 'but': 0.37; 'received:192': 0.37; 'linked': 0.38; 'replace': 0.38; 'some': 0.38; 'received:192.168': 0.40; '2011': 0.61; 'kind': 0.61; 'order': 0.62; 'further': 0.64; 'header:Reply-To:1': 0.71; 'reply- to:no real name:2**0': 0.72; '30,': 0.74; 'easy:': 0.84; 'otten': 0.84; 'to:none': 0.93 |
| Date | Thu, 01 Dec 2011 10:52:46 -0500 |
| From | Dave Angel <d@davea.name> |
| User-Agent | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 |
| MIME-Version | 1.0 |
| Subject | Re: order independent hash? |
| References | <jb57p7$b1j$1@dough.gmane.org> <mailman.3156.1322657239.27778.python-list@python.org> <30715729.411.1322753732534.JavaMail.geo-discussion-forums@pret21> |
| In-Reply-To | <30715729.411.1322753732534.JavaMail.geo-discussion-forums@pret21> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Provags-ID | V02:K0:oNg0LjV2qZfanEintbmMp+m9HF+0cMklBAFH+3QH1pF OOmqPsuspy1Vjjiw8KtW+t1PQkGh1eUH92Cl/APptr/Hy0gQXS NykwX1R+oLoFMEhUrv8amu13njYJ5CB2+eeuEw/TiyvsIOSNdP vNhd/wXPRJF5AtjplrCK86kjPPzjzztsG/hQA0KKn+byvHoyxu aFJ0pIqPpLLxPKxJk7Pm07Fw7KrQrb6VWxFWwKqqYBUulgZthX 7HlPgqg9UfpG0g+Bhh240aXKAZ/9u6eD/USAaxLtZrJffzWiZ+ ZMSGEl5iCSdqmNdflcSE7o2JFFeumknAugep+pGGfPDEo/Xuw= = |
| Cc | python-list@python.org, 88888 Dihedral <dihedral88888@googlemail.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| Reply-To | d@davea.name |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3201.1322754793.27778.python-list@python.org> (permalink) |
| Lines | 23 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1322754794 news.xs4all.nl 6958 [2001:888:2000:d::a6]:41114 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:16501 |
Show key headers only | View raw
On 12/01/2011 10:35 AM, 88888 Dihedral wrote: > On Wednesday, November 30, 2011 8:47:13 PM UTC+8, Peter Otten wrote: >> Neal Becker wrote: >> >>> I like to hash a list of words (actually, the command line args of my >>> program) in such a way that different words will create different hash, >>> but not sensitive to the order of the words. Any ideas? >> You mean a typical python hash value which would be /likely/ to differ for >> different lists and /guaranteed/ to be equal for equal lists is not good >> enough? Because that would be easy: >> >> args = sys.argv[1:] >> hash(tuple(sorted(args))) # consider duplicate args > I knew a hash can replace a bi-directional linked list. > The value can be a multi-field string to be parsed for further actions. > Is this what you are asking? A hash is a number, so I don't see how it can replace any kind of linked list. Perhaps you're thinking of some other language. -- DaveA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: order independent hash? Peter Otten <__peter__@web.de> - 2011-11-30 13:47 +0100
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-01 07:35 -0800
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-01 07:35 -0800
Re: order independent hash? Dave Angel <d@davea.name> - 2011-12-01 10:52 -0500
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-01 08:17 -0800
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-01 08:17 -0800
Re: order independent hash? Chris Angelico <rosuav@gmail.com> - 2011-12-02 03:18 +1100
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-01 20:29 -0800
Re: order independent hash? Chris Angelico <rosuav@gmail.com> - 2011-12-02 16:00 +1100
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-01 21:48 -0800
Re: order independent hash? Lie Ryan <lie.1296@gmail.com> - 2011-12-05 00:40 +1100
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-01 21:48 -0800
Re: order independent hash? Roel Schroeven <rschroev_nospam_ml@fastmail.fm> - 2011-12-04 14:41 +0100
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-04 07:39 -0800
Re: order independent hash? Ian Kelly <ian.g.kelly@gmail.com> - 2011-12-04 10:41 -0700
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-04 10:06 -0800
Re: order independent hash? Ian Kelly <ian.g.kelly@gmail.com> - 2011-12-04 13:13 -0700
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-04 15:17 -0800
Re: order independent hash? Matt Joiner <anacrolix@gmail.com> - 2011-12-05 10:21 +1100
Re: order independent hash? Ian Kelly <ian.g.kelly@gmail.com> - 2011-12-04 16:24 -0700
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-04 16:52 -0800
Re: order independent hash? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-05 02:00 +0000
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-04 16:52 -0800
Re: order independent hash? Lie Ryan <lie.1296@gmail.com> - 2011-12-05 12:59 +1100
Re: order independent hash? Ethan Furman <ethan@stoneleaf.us> - 2011-12-04 18:08 -0800
Re: order independent hash? Ben Finney <ben+python@benfinney.id.au> - 2011-12-05 15:52 +1100
Re: order independent hash? Matt Joiner <anacrolix@gmail.com> - 2011-12-05 14:02 +1100
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-06 21:24 -0800
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-06 21:24 -0800
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-04 15:17 -0800
Re: order independent hash? Terry Reedy <tjreedy@udel.edu> - 2011-12-04 19:28 -0500
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-04 10:06 -0800
Re: order independent hash? Hrvoje Niksic <hniksic@xemacs.org> - 2011-12-02 10:53 +0100
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-02 03:48 -0800
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-02 09:00 -0800
Re: order independent hash? Terry Reedy <tjreedy@udel.edu> - 2011-12-02 16:40 -0500
Re: order independent hash? Hrvoje Niksic <hniksic@xemacs.org> - 2011-12-04 14:55 +0100
Re: order independent hash? Chris Angelico <rosuav@gmail.com> - 2011-12-05 01:08 +1100
Re: order independent hash? Hrvoje Niksic <hniksic@xemacs.org> - 2011-12-07 14:28 +0100
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-07 09:48 -0800
Re: order independent hash? Tim Chase <python.list@tim.thechases.com> - 2011-12-04 12:57 -0600
Re: order independent hash? Hrvoje Niksic <hniksic@xemacs.org> - 2011-12-08 10:30 +0100
Re: order independent hash? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-09 11:27 +0000
Re: order independent hash? Hrvoje Niksic <hniksic@xemacs.org> - 2011-12-09 17:51 +0100
Re: order independent hash? Chris Angelico <rosuav@gmail.com> - 2011-12-10 04:13 +1100
Re: order independent hash? Lie Ryan <lie.1296@gmail.com> - 2011-12-11 10:58 +1100
Re: order independent hash? Chris Angelico <rosuav@gmail.com> - 2011-12-11 11:17 +1100
Re: order independent hash? Lie Ryan <lie.1296@gmail.com> - 2011-12-11 14:04 +1100
Re: order independent hash? Lie Ryan <lie.1296@gmail.com> - 2011-12-05 00:29 +1100
Re: order independent hash? 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-01 20:29 -0800
Re: order independent hash? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-12-02 04:33 +0000
csiph-web