On 06/07/16 20:35, bruce wrote: > But, what are decorators, why are decorators? who decided you needed them!
Thinking about this a little wider than Python. Decorators are a standard software design pattern and were first(?) formally documented in the famous book known as the "Gang of Four" (GoF) but actually called "Design Patterns" published in 1995. But the GoF decorator pattern is quite different in the way it is implemented (using object inheritance) from Python's functional decorators. But the intent is the same - to add common functionality to another object. I think that's probably the earliest use of "decorator" in a computing context. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor