Re: yet another modifying locals() question

2009-09-14 Thread Ed Anuff
On Sep 13, 8:15 pm, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: Metaclasses are left as an exercise for the reader. The parent class has a metaclass, which is why I was trying this approach instead, since it let me get at the class attributes before the metaclass did.

yet another modifying locals() question

2009-09-13 Thread Ed Anuff
I know that locals() is not supposed to be modifiable under most circumstances, but I'm trying to solve a situation where I'm dynamically generating some class attributes and it seemed to be the best way, so I tried something out that seems to work but I'm not sure that it's kosher: def f(l):