> >
> > 3.c. Is there a Pythonic way to copy all the fields from a template
> > into
> > a record in SQLAlchemy without iterating through all the fields?
I'm not an expert, so take it fwiw and all caveats, etc..., but coming to
python found the use of locals() a handy pythonic shortcut in controller code,
i.e.
x = db.execute('SELECT function(:id) FROM DUAL', locals()).scalar()
something similar could be done to copy/insert if correct variables in template
(locals()) are present. Gets you half-way there.
--
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en.