Class decorators might also be super too

Raymond Hettinger python at rcn.com
Mon May 30 00:27:37 EDT 2011


On May 28, 11:33 pm, Michele Simionato <michele.simion... at gmail.com>
wrote:
> He is basically showing that using mixins for implementing logging is not such a good idea, i.e. you can get the same effect in a better way by making use of other Python features. I argued the same thing many times in the past. I even wrote a module once (strait) to reimplement 99% of multiple inheritance without multiple inheritance, just to show that in can be done in few lines of code in a language as powerful as Python.

More importantly, anyone who reads posts such as David' will walk away
with a deeper understanding of class decorators, mixins, and
inheritance.  That makes the post worthwhile even if someone never
ends up using those particular coding technique.


Raymond



More information about the Python-list mailing list