added usage documentation links to docstrings.
This commit is contained in:
@@ -5,7 +5,8 @@ class ChainLink(object, metaclass=ABCMeta):
|
||||
"""
|
||||
Abstract ChainLink object as part of the Chain of Responsibility pattern.
|
||||
|
||||
External Chain of Responsibility Pattern documentation: U{https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Chain of Responsibility Pattern documentation: U{https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern}
|
||||
"""
|
||||
def __init__(self):
|
||||
"""
|
||||
@@ -44,7 +45,8 @@ class Chain(object, metaclass=ABCMeta):
|
||||
"""
|
||||
Abstract Chain class as part of the Chain of Responsibility pattern.
|
||||
|
||||
External Chain of Responsibility Pattern documentation: U{https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Chain of Responsibility Pattern documentation: U{https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern}
|
||||
"""
|
||||
def __init__(self, chainlink):
|
||||
"""
|
||||
|
||||
@@ -5,7 +5,8 @@ class Receiver(object, metaclass=ABCMeta):
|
||||
"""
|
||||
Abstract receiver class as part of the Command pattern.
|
||||
|
||||
External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}
|
||||
"""
|
||||
def action(self, name, *args, **kwargs):
|
||||
"""
|
||||
@@ -26,7 +27,8 @@ class Command(object, metaclass=ABCMeta):
|
||||
"""
|
||||
Abstract Command class as part of the Command pattern.
|
||||
|
||||
External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}
|
||||
"""
|
||||
def __init__(self, receiver):
|
||||
"""
|
||||
@@ -56,7 +58,8 @@ class Invoker(object, metaclass=ABCMeta):
|
||||
"""
|
||||
Abstract Invoker class as part of the Command pattern.
|
||||
|
||||
External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}
|
||||
"""
|
||||
def __init__(self, valid_commands):
|
||||
"""
|
||||
|
||||
@@ -5,7 +5,8 @@ class Iterator(object):
|
||||
"""
|
||||
An Iterator class for the Iterator design pattern.
|
||||
|
||||
External Iterator Pattern documentation: U{https://en.wikipedia.org/wiki/Iterator_pattern}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Iterator Pattern documentation: U{https://en.wikipedia.org/wiki/Iterator_pattern}
|
||||
"""
|
||||
def __init__(self, iterable):
|
||||
"""
|
||||
@@ -27,7 +28,8 @@ class Iterable(object, metaclass=ABCMeta):
|
||||
"""
|
||||
An abstract class representing an Iterable object as part of the Iterator design pattern.
|
||||
|
||||
External Iterator Pattern documentation: U{https://en.wikipedia.org/wiki/Iterator_pattern}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Iterator Pattern documentation: U{https://en.wikipedia.org/wiki/Iterator_pattern}
|
||||
"""
|
||||
@abstractmethod
|
||||
def __next__(self):
|
||||
|
||||
@@ -5,7 +5,8 @@ class Mediator(object):
|
||||
"""
|
||||
Mediator class as part of the Mediator design pattern.
|
||||
|
||||
External Mediator Pattern documentation: U{https://en.wikipedia.org/wiki/Mediator_pattern}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Mediator Pattern documentation: U{https://en.wikipedia.org/wiki/Mediator_pattern}
|
||||
"""
|
||||
def __init__(self):
|
||||
"""
|
||||
|
||||
@@ -5,7 +5,8 @@ class Memento(object):
|
||||
"""
|
||||
Memento class as part of the Memento design pattern.
|
||||
|
||||
External Memento Pattern documentation: U{https://en.wikipedia.org/wiki/Memento_pattern}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Memento Pattern documentation: U{https://en.wikipedia.org/wiki/Memento_pattern}
|
||||
"""
|
||||
def __init__(self, state):
|
||||
"""
|
||||
@@ -25,7 +26,8 @@ class Originator(object):
|
||||
"""
|
||||
Originator base class as part of the Memento design pattern.
|
||||
|
||||
External Mediator Pattern documentation: U{https://en.wikipedia.org/wiki/Memento_pattern}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Mediator Pattern documentation: U{https://en.wikipedia.org/wiki/Memento_pattern}
|
||||
"""
|
||||
def commit(self):
|
||||
"""
|
||||
|
||||
@@ -2,7 +2,8 @@ class Null(object):
|
||||
"""
|
||||
A Null object class as part of the Null object design pattern.
|
||||
|
||||
External Null Object Pattern documentation: U{https://en.wikipedia.org/wiki/Null_Object_pattern}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Null Object Pattern documentation: U{https://en.wikipedia.org/wiki/Null_Object_pattern}
|
||||
"""
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""
|
||||
|
||||
@@ -5,7 +5,8 @@ class Observer(object, metaclass=ABCMeta):
|
||||
"""
|
||||
Abstract Observer class as part of the Observer design pattern.
|
||||
|
||||
External Observer Pattern documentation: U{https://en.wikipedia.org/wiki/Observer_pattern}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Observer Pattern documentation: U{https://en.wikipedia.org/wiki/Observer_pattern}
|
||||
"""
|
||||
@abstractmethod
|
||||
def update(self, **state):
|
||||
@@ -19,7 +20,8 @@ class Observable(object):
|
||||
"""
|
||||
Base Observable class as part of the Observer design pattern.
|
||||
|
||||
External Observer Pattern documentation: U{https://en.wikipedia.org/wiki/Observer_pattern}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Observer Pattern documentation: U{https://en.wikipedia.org/wiki/Observer_pattern}
|
||||
"""
|
||||
def __init__(self):
|
||||
"""
|
||||
|
||||
@@ -5,7 +5,8 @@ class Visitor(metaclass=ABCMeta):
|
||||
"""
|
||||
Abstract Visitor class as part of the Visitor Design Pattern.
|
||||
|
||||
External Visitor Design Pattern documentation: U{https://en.wikipedia.org/wiki/Visitor_pattern}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Visitor Design Pattern documentation: U{https://en.wikipedia.org/wiki/Visitor_pattern}
|
||||
"""
|
||||
def visit(self, node, *args, **kwargs):
|
||||
"""
|
||||
@@ -42,7 +43,8 @@ class Visitee(object):
|
||||
"""
|
||||
A base class for objects that wish to be able to be visited by a Visitor class.
|
||||
|
||||
External Visitor Design Pattern documentation: U{https://en.wikipedia.org/wiki/Visitor_pattern}
|
||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
||||
- External Visitor Design Pattern documentation: U{https://en.wikipedia.org/wiki/Visitor_pattern}
|
||||
"""
|
||||
def accept(self, visitor, *args, **kwargs):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user