uhm i'm trying to make a very simple but large database:
Let's say I want these fields : |name|age|country|
Then I can't do this because I use the same key
db[name] = 'piet'
db[age] = '20'
db[country] = 'nl'
#same keys so it wil overwrite
db[name] = 'jan'
db[age] = '40'
db[country] = 'eng'
[EMAIL PROTECTED] wrote:
uhm i'm trying to make a very simple but large database:
Let's say I want these fields : |name|age|country|
Then I can't do this because I use the same key
db[name] = 'piet'
db[age] = '20'
db[country] = 'nl'
#same keys so it wil overwrite
db[name] = 'jan'
db[age] =
On Mon, 28 Feb 2005 11:48:44 -0500
Christopher De Vries [EMAIL PROTECTED] wrote:
If you want your key, value pairs in a certain order you have to sort
them yourself. Dictionaries and bsddb keys are unsorted.
You are not right, records in BTree (btopen) are certainly sorted. For
positive
On Wed, Mar 02, 2005 at 01:31:04PM +0300, Denis S. Otkidach wrote:
You are not right, records in BTree (btopen) are certainly sorted. For
positive integers you can pack keys with struct.pack('I', value).
You're right... I missed the btopen (rather a key thing to miss I know, but
when you have
oyea, I must convert it to numbers ;)
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Feb 28, 2005 at 08:30:59AM -0800, [EMAIL PROTECTED] wrote:
WHen I use the code below and printing all the results i get this:
--
0 1 10
11 2 3
4 5 6
7 8 9
--
But I want
--
0 1 2
3 4 5
6 7 8
9 10 11
--
If you want your key, value pairs in a certain order you
Christopher De Vries wrote:
On Mon, Feb 28, 2005 at 08:30:59AM -0800, [EMAIL PROTECTED] wrote:
WHen I use the code below and printing all the results i get this:
--
0 1 10
11 2 3
4 5 6
7 8 9
--
But I want
--
0 1 2
3 4 5
6 7 8
9 10 11
--
If you want your key, value pairs in a