Metaclass programming in Python (IBM developerWorks)
[Posted February 26, 2003 by cook]
David Mertz, and Michele Simionato
explain metaclass programming concepts in Python.
"
Most readers are already familiar with the concepts of object-oriented programming: inheritance, encapsulation, polymorphism. But the creation of objects of a given class, with certain parents, is usually thought of as a "just so" operation. It turns out that a number of new programming constructs become either easier, or possible at all, when you can customize the process of object creation. Metaclasses enable certain types of "aspect-oriented programming," for example, you can enhance classes with features like tracing capabilities, object persistence, exception logging, and more."
(
Log in to post comments)