added external design pattern documentation links to structural patterns.
This commit is contained in:
@@ -5,6 +5,8 @@ from abc import ABCMeta, abstractmethod
|
||||
class Decorator(object, metaclass=ABCMeta):
|
||||
"""
|
||||
Base Decorator class that all decorator classes inherit from.
|
||||
|
||||
External Decorator Pattern documentation: U{https://en.wikipedia.org/wiki/Decorator_pattern}
|
||||
"""
|
||||
def __get__(self, instance, owner):
|
||||
"""
|
||||
@@ -23,6 +25,8 @@ class Decorator(object, metaclass=ABCMeta):
|
||||
class DecoratorSimple(Decorator, metaclass=ABCMeta):
|
||||
"""
|
||||
A Base Decorator class for decorators with no arguments.
|
||||
|
||||
External Decorator Pattern documentation: U{https://en.wikipedia.org/wiki/Decorator_pattern}
|
||||
"""
|
||||
def __init__(self, func):
|
||||
"""
|
||||
@@ -36,6 +40,8 @@ class DecoratorSimple(Decorator, metaclass=ABCMeta):
|
||||
class DecoratorComplex(Decorator, metaclass=ABCMeta):
|
||||
"""
|
||||
A Base Decorator class for decorators with arguments.
|
||||
|
||||
External Decorator Pattern documentation: U{https://en.wikipedia.org/wiki/Decorator_pattern}
|
||||
"""
|
||||
@abstractmethod
|
||||
def __init__(self, *args, **kwargs):
|
||||
@@ -63,6 +69,8 @@ class DecoratorComplex(Decorator, metaclass=ABCMeta):
|
||||
class CallWrapper(DecoratorSimple):
|
||||
"""
|
||||
A Decorator for wrapping DecoratorComplex __call__ methods.
|
||||
|
||||
External Decorator Pattern documentation: U{https://en.wikipedia.org/wiki/Decorator_pattern}
|
||||
"""
|
||||
def __call__(self, instance, func):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user