July 02, 2002
Python Metaclasses

There has been a lot of discussion about metaclasses on c.l.py recently.

Ian McMeans asked for examples of the sort of thing that can best be done using metaclasses, and Mark McEahern demonstrates the use of metaclasses to implement aspect oriented programming in Python.

If this stuff makes your brains leak out of your ears, see Vladimir Marangozov's introduction to metaclasses. If it doesn't make your brains leak out of your ears, well, you are a lot cleverer than I am.

I linked to Jeff Epler's FinalMethods metaclass some time ago.

Aspect Oriented programming links here.

Posted to Python by Simon Brunning at July 02, 2002 03:19 PM
Comments

how are you
i want to know this point please
what is Metaclasses ?
what is the benefits of Metaclasses ?
examples of Metaclasses ?
can Metaclasses implemented using java ? if yes how?
thanks alot

Posted by: maha on December 1, 2003 10:24 AM

If you follow the links above, you'll find answers to almost all these questions. ;-)

AFAIK, you can't do general metaclass programming in Java, no. Bytecode hacks allow you to do the same thing - see AspectJ, for instance, but I don't know of any general purpose metaclass programming too for Java.

Posted by: Simon Brunning on December 1, 2003 10:36 AM
Post a comment
Name:


Email Address:


URL:



Comments:


Remember info?