threads concerning python itself that we've met often along the way and will finalize in the conclusion that follows where you go after this book is up to youof coursebut in an open source project it' important to keep the big picture in mind while hacking the small details to metaclass or not to metaclass metaclasses are perhaps the most advanced topic in this bookif not the python language as whole to borrow quote from the comp lang python newsgroup by veteran python core developer tim peters (who is also the author of the famous "import thispython motto)[metaclassesare deeper magic than of users should ever worry about if you wonder whether you need themyou don' (the people who actually need them know with certainty that they need themand don' need an explanation about whyin other wordsmetaclasses are primarily intended for subset of programmers building apis and tools for others to use in many (if not mostcasesthey are probably not the best choice in applications work this is especially true if you're developing code that other people will use in the future coding something "because it seems coolis not generally reasonable justificationunless you are experimenting or learning stillmetaclasses have wide variety of potential rolesand it' important to know when they can be useful for examplethey can be used to enhance classes with features like tracingobject persistenceexception loggingand more they can also be used to construct portions of class at runtime based upon configuration filesapply function decorators to every method of class genericallyverify conformance to expected interfacesand so on in their more grandiose incarnationsmetaclasses can even be used to implement alternative coding patterns such as aspect-oriented programmingobject/relational mappers (ormsfor databasesand more although there are often alternative ways to achieve such results--as we'll seethe roles of class decorators and metaclasses often intersect--metaclasses provide formal model tailored to those tasks we don' have space to explore all such applications first-hand in this of coursebut you should feel free to search the web for additional use cases after studying the basics here probably the reason for studying metaclasses most relevant to this book is that this topic can help demystify python' class mechanics in general for instancewe'll see that they are an intrinsic part of the language' new-style inheritance model finally formalized in full here although you may or may not code or reuse them in your worka cursory understanding of metaclasses can impart deeper understanding of python at large metaclasses