to metaclass' __getitem__ in the first example of the section--strongly suggesting that new-style __getattr__ is special case of special caseand further recommending code simplicity that avoids dependence on such boundary casesb data [ append( explicit normal names routed to meta' getattr data [ __getitem__( explicit special names routed to meta' gettarr [ but built-ins skip meta' gettatr too?typeerror'aobject does not support indexing as you can probably tellmetaclasses are interesting to explorebut it' easy to lose track of their big picture in the interest of spacewe'll omit additional fine points here for the purposes of this it' more important to show why you' care to use such tool in the first place let' move on to some larger examples to sample the roles of metaclasses in action as we'll findlike so many tools in pythonmetaclasses are first and foremost about easing maintenance work by eliminating redundancy exampleadding methods to classes in this and the following sectionwe're going to study examples of two common use cases for metaclassesadding methods to classand decorating all methods automatically these are just two of the many metaclass roleswhich unfortunately will consume the space we have left for this againyou should consult the web for more advanced applications these examples are representative of metaclasses in actionthoughand they suffice to illustrate their application moreoverboth give us an opportunity to contrast class decorators and metaclasses-our first example compares metaclassand decorator-based implementations of class augmentation and instance wrappingand the second applies decorator with metaclass first and then with another decorator as you'll seethe two tools are often interchangeableand even complementary manual augmentation earlier in this we looked at skeleton code that augmented classes by adding methods to them in various ways as we sawsimple class-based inheritance suffices if the extra methods are statically known when the class is coded composition via object embedding can often achieve the same effect too for more dynamic scenariosthoughother techniques are sometimes required--helper functions can usually sufficebut metaclasses provide an explicit structure and minimize the maintenance costs of changes in the future exampleadding methods to classes