Re: Making things more functional in Python
From: Michael Hoffman (cam.ac.uk_at_mh391.invalid)
Date: 03/04/05
- Next message: Steve Holden: "Re: Making things more functional in Python"
- Previous message: uche.ogbuji_at_gmail.com: "Re: best XSLT processor?"
- In reply to: Steve Holden: "Re: Making things more functional in Python"
- Next in thread: Steve Holden: "Re: Making things more functional in Python"
- Reply: Steve Holden: "Re: Making things more functional in Python"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 04 Mar 2005 17:30:10 +0000
Steve Holden wrote:
> return dict([(d, sample.getval(d)) for d in dset for sample in samples])
That won't do what the original code does. This sets dict[d] to
samples[-1].getval(d) instead of [sample.getval(d) for sample in samples].
-- Michael Hoffman
- Next message: Steve Holden: "Re: Making things more functional in Python"
- Previous message: uche.ogbuji_at_gmail.com: "Re: best XSLT processor?"
- In reply to: Steve Holden: "Re: Making things more functional in Python"
- Next in thread: Steve Holden: "Re: Making things more functional in Python"
- Reply: Steve Holden: "Re: Making things more functional in Python"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]