Hi Dave!
You were absolutely right.
I don't want to iterate the entire dict to get me the key/values
Let us say this dict would have 20.000 entries, but I want only those
with Aa to be grabed.
Those starting with these 2 letters would be only 5 or 6 then it would
take a lot of time.
In
Tamer Higazi wrote:
Hi Dave!
You were absolutely right.
I don't want to iterate the entire dict to get me the key/values
Let us say this dict would have 20.000 entries, but I want only those
with Aa to be grabed.
Those starting with these 2 letters would be only 5 or 6 then it would
Hi Peter!
I got the message
I know that I could have used a database. I am using for a good reason
the ZODB Database.
I am making things in the ZODB Database persistent, I don't like to
distribute among machines.
Making use of sqlite, won't give me the possibility to scale as the
amount
Reordering to un-top-post.
On 11.12.2013 06:47, Dave Angel wrote:
On Wed, 11 Dec 2013 02:02:20 +0200, Tamer Higazi wrote:
Is there a way to get dict by search terms without iterating the
entire
dictionary ?!
I want to grab the dict's key and values started with 'Ar'...
Your wording
On Wed, 11 Dec 2013 12:07:08 +0200, Tamer Higazi wrote:
Hi Dave!
You were absolutely right.
I don't want to iterate the entire dict to get me the key/values
Let us say this dict would have 20.000 entries, but I want only those
with Aa to be grabed.
Those starting with these 2 letters
On 2013-12-11 13:44, Steven D'Aprano wrote:
If necessary, I would consider having 26 dicts, one for each
initial letter:
data = {}
for c in ABCDEFGHIJKLMNOPQRSTUVWXYZ:
data[c] = {}
then store keys in the particular dict. That way, if I wanted keys
starting with Aa, I would only
In article 3efc283f-419d-41b6-ad20-c2901c3b9...@googlegroups.com,
rusi rustompm...@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/
I agree
On Wednesday, December 11, 2013 8:16:12 PM UTC+5:30, Roy Smith wrote:
rusi 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/
I agree that a
On 2013-12-11 09:46, Roy Smith wrote:
The problem is, that doesn't make a whole lot of sense in Python.
The cited implementation uses dicts at each level. By the time
you've done that, you might as well just throw all the data into
one big dict and use the full search string as the key. It
On 11/12/2013 00:02, Tamer Higazi wrote:
Hi people!
Is there a way to get dict by search terms without iterating the entire
dictionary ?!
Let us assume I have:
{'Amanda':'Power','Amaly':'Higgens','Joseph':'White','Arlington','Black','Arnold','Schwarzenegger'}
I want to grab the dict's key
On Dec 11, 2013, at 5:31 AM, rusi rustompm...@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
On 11/12/2013 17:19, Travis Griggs wrote:
On Dec 11, 2013, at 5:31 AM, rusi rustompm...@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/
On Wed, Dec 11, 2013 at 7:30 AM, Tim Chase
python.l...@tim.thechases.com wrote:
On 2013-12-11 13:44, Steven D'Aprano wrote:
If necessary, I would consider having 26 dicts, one for each
initial letter:
data = {}
for c in ABCDEFGHIJKLMNOPQRSTUVWXYZ:
data[c] = {}
then store keys in the
On Wed, Dec 11, 2013 at 6:02 PM, Ian Kelly ian.g.ke...@gmail.com wrote:
This is what I did not so long ago when writing a utility for
typeahead lookup, except that to save some space and time I only
nested the dicts as deeply as there were still multiple entries. As
an example of what the
On Tue, Dec 10, 2013 at 4:02 PM, Tamer Higazi tamerito...@arcor.de wrote:
Hi people!
Is there a way to get dict by search terms without iterating the entire
dictionary ?!
Let us assume I have:
{'Amanda':'Power','Amaly':'Higgens','Joseph':'White','
Hi people!
Is there a way to get dict by search terms without iterating the entire
dictionary ?!
Let us assume I have:
{'Amanda':'Power','Amaly':'Higgens','Joseph':'White','Arlington','Black','Arnold','Schwarzenegger'}
I want to grab the dict's key and values started with 'Ar'...
I could
On 11/12/2013 00:02, Tamer Higazi wrote:
Hi people!
Is there a way to get dict by search terms without iterating the entire
dictionary ?!
Let us assume I have:
{'Amanda':'Power','Amaly':'Higgens','Joseph':'White','Arlington','Black','Arnold','Schwarzenegger'}
I want to grab the dict's key
On 2013-12-11 02:02, Tamer Higazi wrote:
Is there a way to get dict by search terms without iterating the
entire dictionary ?!
Let us assume I have:
{'Amanda':'Power','Amaly':'Higgens','Joseph':'White','Arlington','Black','Arnold','Schwarzenegger'}
Tamer Higazi tamerito...@arcor.de writes:
Is there a way to get dict by search terms without iterating the
entire dictionary ?!
(A language note: you may be unaware that “?!” does not connote a simple
question, but outrage or incredulity or some other indignant expression.
This implies not a
On Wed, 11 Dec 2013 02:02:20 +0200, Tamer Higazi
tamerito...@arcor.de wrote:
Is there a way to get dict by search terms without iterating the
entire
dictionary ?!
I want to grab the dict's key and values started with 'Ar'...
Your wording is so ambiguous that each respondent has guessed
20 matches
Mail list logo