By bloid
via blog.jayfields.com
Published: Aug 15 2008 / 05:06
I've been using modules instead of accessing the metaclass directly. "Just in case someone wants to redefine behavior" isn't really a good enough reason for me if the level of effort increases, but in this case I found the code to be easier to follow when I used modules. In programming, there are few win-win situations, but Ali definitely showed me one on this occasion.
If you interact with a metaclass directly, do a quick spike where you introduce a module instead. I think you'll be happy with the resulting code.
Add your comment