Re:Comprehensive Python Decorator Tutorial with Example
by gamebit07 on Saturday December 12, 2015 @01:04AM
(#10721973)
Decorators in Python - Despite the name, Python decorators are not an implementation of the decorator pattern. The decorator pattern is a design pattern used in statically typed object-oriented programming languages to allow functionality to be added to objects at run time; Python decorators add functionality to functions and methods at definition time, and thus are a higher-level construct than decorator-pattern classes. So in Python a decorator is any callable Python object that is used to modify a function, method or class definition.
[ Parent
| on HN ]
There are no comments on this comment yet.