Data mapper - need to map an dictionary of values to a model

George Sakkis george.sakkis at gmail.com
Wed Jan 16 01:00:25 CET 2008


On Jan 15, 6:53 pm, George Sakkis <george.sak... at gmail.com> wrote:

> name_tranformer = lambda input: dict(
>                            zip(('first_name', 'last_name'),
>                            input['name']))

Of course that should write:

name_tranformer = lambda input: dict(
                         zip(('first_name', 'last_name'),
                         input['name'].split()))

George



More information about the Python-list mailing list