Re: yet another modifying locals() question

2009-09-13 Thread Ed Anuff
On Sep 13, 8:15 pm, Steven D'Aprano 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. Overriding the metaclass looked to be a much m

Re: yet another modifying locals() question

2009-09-13 Thread Steven D'Aprano
On Sun, 13 Sep 2009 18:52:47 -0700, Ed Anuff wrote: > 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 see

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):