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