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

George Sakkis george.sakkis at gmail.com
Tue Jan 15 19:00:25 EST 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