RE: creating lists based on parsed items

2007-06-07 Thread Jason White
n-list@python.org Subject: Re: creating lists based on parsed items En Wed, 06 Jun 2007 13:24:54 -0300, Jason White <[EMAIL PROTECTED]> escribió: > I am trying to do what (I think) should be fairly straightforward. I > have a list of items that i want to sort into buckets. in item 1 of

RE: creating lists based on parsed items

2007-06-07 Thread Jason White
Sorry ... one minor detail lacking. I'm saddled with Python 2.3.4 Jason -Original Message- From: [EMAIL PROTECTED] on behalf of Basilisk96 Sent: Wed 6/6/2007 6:49 PM To: python-list@python.org Subject: Re: creating lists based on parsed items > If you are using Python 2.

Re: creating lists based on parsed items

2007-06-06 Thread Basilisk96
> This would be a RTFM moment :) defaultdict is not a built-in, it is part > of the collections module. Bingo! I should have read higher up in the manual tree :) Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: creating lists based on parsed items

2007-06-06 Thread Steven D'Aprano
On Wed, 06 Jun 2007 22:49:27 +, Basilisk96 wrote: >> If you are using Python 2.5, use a defaultdict instead, the very first >> example looks like what you want. >> >> >> -- >> Gabriel Genellina > > Uh-oh.. > I am using Python 2.5 on WinXP,

Re: creating lists based on parsed items

2007-06-06 Thread Basilisk96
> If you are using Python 2.5, use a defaultdict instead, the very first > example looks like what you want. > > > -- > Gabriel Genellina Uh-oh.. I am using Python 2.5 on WinXP, but when I tried the examples in the manual, I got a "NameError: n

Re: creating lists based on parsed items

2007-06-06 Thread Gabriel Genellina
En Wed, 06 Jun 2007 13:24:54 -0300, Jason White <[EMAIL PROTECTED]> escribió: > I am trying to do what (I think) should be fairly straightforward. I > have a list of items that i want to sort into buckets. in item 1 of each > line is the object I want to sort and in item 2 is the name of the

creating lists based on parsed items

2007-06-06 Thread Jason White
Hello all ... Sorry for jumping in and askig with 0 lurk-time. I am trying to do what (I think) should be fairly straightforward. I have a list of items that i want to sort into buckets. in item 1 of each line is the object I want to sort and in item 2 is the name of the bucket. I am making it