kiss revisited"overwrapping-itiswhen used wellthe code reuse features of oop make it excel at cutting development time sometimesthoughoop' abstraction potential can be abused to the point of making code difficult to understand if classes are layered too deeplycode can become obscureyou may have to search through many classes to discover what an operation does for examplei once worked in +shop with thousands of classes (some machinegenerated)and up to levels of inheritance deciphering method calls in such complex system was often monumental taskmultiple classes had to be consulted for even the most basic of operations in factthe logic of the system was so deeply wrapped that understanding piece of code in some cases required days of wading through related files this obviously isn' ideal for programmer productivitythe most general rule of thumb of python programming applies heretoodon' make things complicated unless they truly must be wrapping your code in multiple layers of classes to the point of incomprehensibility is always bad idea abstraction is the basis of polymorphism and encapsulationand it can be very effective tool when used well howeveryou'll simplify debugging and aid maintainability if you make your class interfaces intuitiveavoid making your code overly abstractand keep your class hierarchies short and flat unless there is good reason to do otherwise remembercode you write is generally code that others must read see for more on kiss summary this presented an assortment of advanced class-related topicsincluding subclassing built-in typesnew-style classesstatic methodsand decorators most of these are optional extensions to the oop model in pythonbut they may become more useful as you start writing larger object-oriented programsand are fair game if they appear in code you must understand as mentioned earlierour discussion of some of the more advanced class tools continues in the final part of this bookbe sure to look ahead if you need more details on propertiesdescriptorsdecoratorsand metaclasses this is the end of the class part of this bookso you'll find the usual lab exercises at the end of the be sure to work through them to get some practice coding real classes in the next we'll begin our look at our last core language topicexceptions--python' mechanism for communicating errors and other conditions to your code this is relatively lightweight topicbut 've saved it for last because new exceptions are supposed to be coded as classes today before we tackle that final core subjectthoughtake look at this quiz and the lab exercises advanced class topics