Need good example uses for metaclasses

0 views
Skip to first unread message

Matt Wilson

unread,
Apr 15, 2008, 10:25:08 PM4/15/08
to clepy
Does anyone have any good examples of when metaclasses are the most
elegant solution?

Examples I like that I've already heard:

* Make properties out of methods based on their names
* Apply decorators to all the methods on a class

All ideas welcome. Full disclosure: I'm working on an article about
metaclasses. I'll happily credit anyone that gives me a useful idea.

Matt
Reply all
Reply to author
Forward
0 new messages