Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 740 Bytes

README.md

File metadata and controls

17 lines (13 loc) · 740 Bytes

What is a Python decorator?

PEP 318

PEP 318 was where it all started. However, there isn't a lot we can learn from it. It was written in 2003 and at that time people were still arguing over how to implement decorators, or whether they should be implemented in the language at all, without much experience that can be borrowed from other languages. Thus it is more about designing the decorator syntax than using decorators.

There is also another PEP written later, PEP 3129. It simply introduces class decorators (i.e. decorators decorating classes) in the syntax.

Prev / Up / Next