my creation routed to meta like meta(' '()}in python xthe effect is the samebut the coding differs--use class attribute instead of keyword argument in the class headerclass c__metaclass__ meta my creation routed to meta in either linepython calls class' metaclass to create the new class objectpassing in the data defined during the class statement' runin xthe metaclass simply defaults to the classic class creatorclassname meta(classnamesuperclassesattributedictto assume control of the creation or initialization of new class objecta metaclass generally redefines the __new__ or __init__ method of the type class that normally intercepts this call the net effectas with class decoratorsis to define code to be run automatically at class creation time herethis step binds the class name to the result of call to user-defined metaclass in facta metaclass need not be class at all-- possibility we'll explore later that blurs some of the distinction between this tool and decoratorsand may even qualify the two as functionally equivalent in many roles both schemesclass decorators and metaclassesare free to augment class or return an arbitrary object to replace it-- protocol with almost limitless class-based customization possibilities as we'll see latermetaclasses may also define methods that process their instance classesrather than normal instances of them-- technique that' similar to class methodsand might be emulated in spirit by methods and data in class decorator proxiesor even class decorator that returns metaclass instance such mindbinding concepts will require ' conceptual groundwork (and quite possibly sedation!for more details naturallythere' much more to the decorator and metaclass stories than 've shown here although they are general mechanism whose usage may be required by some packagescoding new user-defined decorators and metaclasses is an advanced topic of interest primarily to tool writersnot application programmers because of thiswe'll defer additional coverage until the final and optional part of this book shows how to code properties using function decorator syntax in more depth has much more on decoratorsincluding more comprehensive examples covers metaclassesand more on the class and instance management story advanced class topics