Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Whenever I teach a course in advanced Python, the people asking for the training specifically request/demand that I talk about metaclasses. This is almost certainly because they (1) want an advanced class, and (2) metaclasses are advanced. So yeah, I cover them to some degree in my courses, but I give plenty of advance warning that we're looking at this because it's fascinating to see how some of the deeper recesses of Python classes work, not because this will truly be useful.

Sure enough, when I'm done with my explanation, the participants agree that metaclasses are really something that they're not planning to touch or use. And then I repeat my claim (which isn't original with me at all) that decorators are easier to understand and maintain, and should be used instead.

I totally agree that learning to write readable, testable code is a far better use of time. (I include that in my classes, too... but people rarely request that, I'm afraid...)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: