Adding method to class at run-time: bad style?

Michele Simionato michele.simionato at gmail.com
Tue Apr 7 16:43:48 CEST 2009


On Apr 7, 4:37 pm, Grant Edwards <invalid at invalid> wrote:
> I realize that technically all methods are added to classes at
> "run-time", but what I'm talking about is this:
<snip>

Raymond Hettinger solves this problem nicely with a class decorator:
http://code.activestate.com/recipes/576685/



More information about the Python-list mailing list