decorators in the advanced class topics of this book ()we met static and class methodstook quick look at the decorator syntax python offers for declaring themand previewed decorator coding techniques we also met function decorators briefly in while exploring the property built-in' ability to serve as oneand in while studying the notion of abstract superclasses this picks up where this previous decorator coverage left off herewe'll dig deeper into the inner workings of decorators and study more advanced ways to code new decorators ourselves as we'll seemany of the concepts we studied earlier--especially state retention--show up regularly in decorators this is somewhat advanced topicand decorator construction tends to be of more interest to tool builders than to application programmers stillgiven that decorators are becoming increasingly common in popular python frameworksa basic understanding can help demystify their roleeven if you're just decorator user besides covering decorator construction detailsthis serves as more realistic case study of python in action because its examples grow somewhat larger than most of the others we've seen in this bookthey better illustrate how code comes together into more complete systems and tools as an extra perksome of the code we'll write here may be used as general-purpose tools in your day-to-day programs what' decoratordecoration is way to specify management or augmentation code for functions and classes decorators themselves take the form of callable objects ( functionsthat process other callable objects as we saw earlier in this bookpython decorators come in two related flavorsneither of which requires or new-style classesfunction decoratorsadded in python do name rebinding at function definition timeproviding layer of logic that can manage functions and methodsor later calls to them