Bob Rogers wrote: > So you're saying you don't know the answer? The question wasn't > "should I use setattr?"
If what you're doing is wrong and backwards then it doesn't matter what the question is. Best practices are best practices for a reason. There's no reason to use eval to do what you want. The constructs eval/exec/compile all have their purposes (for example: a remote python shell) but they weren't intended to be broken replacements for setattr. -- http://mail.python.org/mailman/listinfo/python-list