On 12/9/05, midtoad <[EMAIL PROTECTED]> wrote:
> If the issue is that your field name is being determined
> programatically, so you don't know it ahead of time, you could always
> use the following:
> data = eval("record.%" % (fieldname,))

That is the issue here. getattr is the standard way to handle this
problem. Using eval is a lot less efficient than using getattr, which
is just a dictionary lookup.

Reply via email to