decorator state retention options class blunders idecorating methods timing calls adding decorator arguments coding class decorators singleton classes tracing object interfaces class blunders iiretaining multiple instances decorators versus manager functions why decorators(revisitedmanaging functions and classes directly example"privateand "publicattributes implementing private attributes implementation details generalizing for public declarationstoo implementation details ii open issues python isn' about control examplevalidating function arguments the goal basic range-testing decorator for positional arguments generalizing for keywords and defaultstoo implementation details open issues decorator arguments versus function annotations other applicationstype testing (if you insist!summary test your knowledgequiz test your knowledgeanswers metaclasses to metaclass or not to metaclass increasing levels of "magica language of hooks the downside of "helperfunctions metaclasses versus class decoratorsround the metaclass model classes are instances of type metaclasses are subclasses of type class statement protocol declaring metaclasses declaration in table of contents xxix