Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #61601
| Path | csiph.com!usenet.pasdenom.info!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <travisgriggs@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.033 |
| X-Spam-Evidence | '*H*': 0.93; '*S*': 0.00; 'favorable': 0.07; 'python:': 0.09; 'subject:keys': 0.09; 'url:github': 0.09; 'idea:': 0.16; 'section).': 0.16; 'subject:values': 0.16; 'wrote:': 0.18; 'thoughts': 0.19; 'subject:/': 0.26; 'header:In- Reply-To:1': 0.27; 'received:172.16': 0.29; 'am,': 0.29; 'dec': 0.30; 'comments': 0.31; 'url:wiki': 0.31; 'url:wikipedia': 0.31; 'there,': 0.34; 'received:google.com': 0.35; 'done': 0.36; 'charset:us-ascii': 0.36; 'url:org': 0.36; 'performance': 0.37; 'message-id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'structure': 0.39; 'to:addr:python.org': 0.39; 'here:': 0.62; 'header:Message-Id:1': 0.63; '2013,': 0.91; 'rusi': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=A0JjtrNnXscmYOqMC+JV+bs2PYb19s+pN5N6e3J5UuQ=; b=npCc0uXHafY1eLqf+xLj1engsnisE5czWzr8WkajoRaeaXyoiTcdG9AdN1zWk58f+Q GfZtp2JVLqmQLm3KU8aY+Ez+Mo5OlTDD4w4FHH+2JX7X29EHUgVm/8j9e3EgLLAuTiK7 tD9LhtgJirYrnYABpF7rzdqenOT6tgbc7warNQVyThiPieolV0xTky7+a56OYmmD+GuQ C9xFiHGQi0V6HpLagKEd5gqkUNyEj0ADx59SuL9jUseh9HBoDCJwsvFW3ytz86GQlwDG mz5A4z9uOZdG2isJG9cjs1SiZsyiDbkUbBJX3C5zBplWCskgvo1wKqkCREssONRZzNnH 5YiQ== |
| X-Received | by 10.68.204.136 with SMTP id ky8mr3167322pbc.33.1386782394564; Wed, 11 Dec 2013 09:19:54 -0800 (PST) |
| Content-Type | text/plain; charset=us-ascii |
| Mime-Version | 1.0 (Mac OS X Mail 7.0 \(1822\)) |
| Subject | Re: grab dict keys/values without iterating ?! |
| From | Travis Griggs <travisgriggs@gmail.com> |
| In-Reply-To | <3efc283f-419d-41b6-ad20-c2901c3b9f78@googlegroups.com> |
| Date | Wed, 11 Dec 2013 09:19:48 -0800 |
| Content-Transfer-Encoding | quoted-printable |
| References | <52A7AB8C.8030700@arcor.de> <52A7AB8C.8030700@arcor.de> <almarsoft.6523303589308130554@news.gmane.org> <mailman.3885.1386762407.18130.python-list@python.org> <3efc283f-419d-41b6-ad20-c2901c3b9f78@googlegroups.com> |
| To | python-list@python.org |
| X-Mailer | Apple Mail (2.1822) |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3916.1386782404.18130.python-list@python.org> (permalink) |
| Lines | 23 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1386782404 news.xs4all.nl 2956 [2001:888:2000:d::a6]:50730 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:61601 |
Show key headers only | View raw
On Dec 11, 2013, at 5:31 AM, rusi <rustompmody@gmail.com> wrote: > > The classic data structure for this is the trie: > General idea: http://en.wikipedia.org/wiki/Trie > In python: > http://stackoverflow.com/questions/11015320/how-to-create-a-trie-in-python/ My thoughts exactly! If you wade through the comments there, someone has done a more-than-naive implementation here: https://github.com/kmike/marisa-trie The write up makes it look pretty favorable as well for performance (scroll 2/3s down to the Benchmarks section).
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: grab dict keys/values without iterating ?! Tamer Higazi <tameritoke2@arcor.de> - 2013-12-11 12:07 +0200
Re: grab dict keys/values without iterating ?! rusi <rustompmody@gmail.com> - 2013-12-11 05:31 -0800
Re: grab dict keys/values without iterating ?! Roy Smith <roy@panix.com> - 2013-12-11 09:46 -0500
Re: grab dict keys/values without iterating ?! rusi <rustompmody@gmail.com> - 2013-12-11 07:08 -0800
Re: grab dict keys/values without iterating ?! Tim Chase <python.list@tim.thechases.com> - 2013-12-11 09:42 -0600
Re: grab dict keys/values without iterating ?! Travis Griggs <travisgriggs@gmail.com> - 2013-12-11 09:19 -0800
Re: grab dict keys/values without iterating ?! Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-11 18:09 +0000
Re: grab dict keys/values without iterating ?! Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-11 13:44 +0000
Re: grab dict keys/values without iterating ?! Tim Chase <python.list@tim.thechases.com> - 2013-12-11 08:30 -0600
Re: grab dict keys/values without iterating ?! Ian Kelly <ian.g.kelly@gmail.com> - 2013-12-11 18:02 -0700
Re: grab dict keys/values without iterating ?! Ian Kelly <ian.g.kelly@gmail.com> - 2013-12-11 18:05 -0700
csiph-web