> > > What would be a clean pythonic way of constructing this statement?
>
> > web.multiple_insert('table_name', names=("col1", "col2"), values=
> > [("val1", "val2"), ("val3", "val4")])
>
> how about this:
> web.multiple_insert('table_name', names=("col1", "col2"),
> values=[{"col1":"val1","col2: "val2"}, {"col1":"val3", "col2":"val4"}])

You asked for clean pythonic way, right?
I think Anand's choice is more idiomatic and surely cleaner, and
perhaps faster with the tuples, with no necessity of providing the
column names for each row


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to