On Wed, Oct 3, 2012 at 6:23 PM, Daniel Klein <bri...@gmail.com> wrote:
> tempmes.polish = row[1]
>
> Well, I do. Like this:
>
> eval("tempmes." + language + " = row[1]")
>
> But... eval is evil, no? There's got to be a better way?
> --
> http://mail.python.org/mailman/listinfo/python-list

Easy.

tempmes = myissue.name
language = 'polish'
setattr(tempmes, language, row[1])
tempmes.save()

-- 
Kwpolska <http://kwpolska.tk>
stop html mail      | always bottom-post
www.asciiribbon.org | www.netmeister.org/news/learn2quote.html
GPG KEY: 5EAAEA16
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to