there are actually lots of ways, but the bigger "issue" is what your
function/logic needs:
- accessing row attributes with "dot notation" as in row.column_name ?
- using update_record(), delete_record() ?
- having "reference columns" lazy-evaluating the referenced table/row ?
- display a sqltable when doing {{=rows}} in the view
- etc etc etc
On Sunday, May 5, 2013 2:04:18 PM UTC+2, villas wrote:
>
> Maybe use the as_dict() method?
>
>
> On Saturday, May 4, 2013 10:19:02 PM UTC+1, lucas wrote:
>>
>> hello one and all,
>>
>> i need the most efficient way to convert raw data into a row of a
>> specific format. what is the most efficient way to do this in python.
>> yes, probably more a python question then web2py.
>>
>> anyway, a bit more details, right now i pass a row from a table to a
>> function and the function processes the data in that row through a complex
>> series of calculations. i have a variation of the data coming from another
>> source and instead of rewriting a perfectly good function, i would like to
>> mangle and convert that data into the same row specifications and pass it
>> through the same function. this way the function can't tell the difference
>> of where the data is coming from, it just processes the data in that row
>> the same way. make sense?
>>
>> so what is the best way to do this? thanx in advance, lucas
>>
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.