syntax@tracer class personbob person('bob' sue person('sue'rate= hours= decorator approach class personnondecorator approach bob wrapper(person('bob' )sue wrapper(person('sue'rate= hours= )assuming you will make more than one instance of classand want to apply the augmentation to every instance of classdecorators will generally be net win in terms of both code size and code maintenance attribute version skew notethe preceding tracer decorator works for explicitly accessed attribute names on all pythons as we learned in and elsewherethough__getattr__ intercepts built-insimplicit accesses to operator overloading methods like __str__ and __repr__ in python ' default classic classesbut not in ' new-style classes in python ' classesinstances inherit defaults for somebut not all of these names from the class (reallyfrom the object superclassmoreoverin ximplicitly invoked attributes for built-in operations like printing and are not routed through __getattr__or its cousin__get attribute__ in new-style classesbuilt-ins start such searches at classes and skip the normal instance lookup entirely herethis means that the __getattr__ based tracing wrapper will automatically trace and propagate operator overloading calls for built-ins in as codedbut not in to see thisdisplay "xdirectly at the end of the preceding interactive session--in the attribute __repr__ is traced and the list prints as expectedbut in no trace occurs and the list prints using default display for the wrapper classx trace__repr__ [ wrapper object at to work the same in xoperator overloading methods generally must be redefined redundantly in the wrapper classeither by handby toolsor by definition in superclasses we'll see this at work again in pri vate decorator later in this -where we'll also study ways to add the methods required of such code in coding class decorators