Package pypat :: Package structural :: Module decorator :: Class DecoratorComplex
[hide private]
[frames] | no frames]

Class DecoratorComplex

source code


A Base Decorator class for decorators with arguments.

- External Usage Documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Structural-Pattern-Usage}
- External Decorator Pattern documentation: U{https://en.wikipedia.org/wiki/Decorator_pattern}

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
Initialize a new DecoratorComplex instance.
source code
 
__call__(self, func, *args, **kwargs)
Concrete DecoratorComplex instances must override the __call__ method.
source code
Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 

Initialize a new DecoratorComplex instance.

Parameters:
  • args - Args for the decorator.
  • kwargs - Keyword args for the decorator.
Decorators:
  • @abstractmethod

__call__(self, func, *args, **kwargs)
(Call operator)

source code 

Concrete DecoratorComplex instances must override the __call__ method.

Parameters:
  • func - The function being decorated.
  • args - Arguments for the decorated function.
  • kwargs - Keyword arguments for the decorated function.
Decorators:
  • @abstractmethod