update external usage links in behavioral pattern docstrings to point to README instead of wiki
This commit is contained in:
@@ -5,7 +5,7 @@ class ChainLink(object, metaclass=ABCMeta):
|
|||||||
"""
|
"""
|
||||||
Abstract ChainLink object as part of the Chain of Responsibility pattern.
|
Abstract ChainLink object as part of the Chain of Responsibility pattern.
|
||||||
|
|
||||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#chain-of-responsibility-pattern}
|
||||||
- External Chain of Responsibility Pattern documentation: U{https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern}
|
- External Chain of Responsibility Pattern documentation: U{https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern}
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@@ -45,7 +45,7 @@ class Chain(object, metaclass=ABCMeta):
|
|||||||
"""
|
"""
|
||||||
Abstract Chain class as part of the Chain of Responsibility pattern.
|
Abstract Chain class as part of the Chain of Responsibility pattern.
|
||||||
|
|
||||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#chain-of-responsibility-pattern}
|
||||||
- External Chain of Responsibility Pattern documentation: U{https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern}
|
- External Chain of Responsibility Pattern documentation: U{https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern}
|
||||||
"""
|
"""
|
||||||
def __init__(self, chainlink):
|
def __init__(self, chainlink):
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class Receiver(object, metaclass=ABCMeta):
|
|||||||
"""
|
"""
|
||||||
Abstract receiver class as part of the Command pattern.
|
Abstract receiver class as part of the Command pattern.
|
||||||
|
|
||||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#command-pattern}
|
||||||
- External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}
|
- External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}
|
||||||
"""
|
"""
|
||||||
def action(self, name, *args, **kwargs):
|
def action(self, name, *args, **kwargs):
|
||||||
@@ -27,7 +27,7 @@ class Command(object, metaclass=ABCMeta):
|
|||||||
"""
|
"""
|
||||||
Abstract Command class as part of the Command pattern.
|
Abstract Command class as part of the Command pattern.
|
||||||
|
|
||||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#command-pattern}
|
||||||
- External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}
|
- External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}
|
||||||
"""
|
"""
|
||||||
def __init__(self, receiver):
|
def __init__(self, receiver):
|
||||||
@@ -58,7 +58,7 @@ class Invoker(object, metaclass=ABCMeta):
|
|||||||
"""
|
"""
|
||||||
Abstract Invoker class as part of the Command pattern.
|
Abstract Invoker class as part of the Command pattern.
|
||||||
|
|
||||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#command-pattern}
|
||||||
- External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}
|
- External Command Pattern documentation: U{https://en.wikipedia.org/wiki/Command_pattern}
|
||||||
"""
|
"""
|
||||||
def __init__(self, valid_commands):
|
def __init__(self, valid_commands):
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class Iterator(object):
|
|||||||
"""
|
"""
|
||||||
An Iterator class for the Iterator design pattern.
|
An Iterator class for the Iterator design pattern.
|
||||||
|
|
||||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#iterator-pattern}
|
||||||
- External Iterator Pattern documentation: U{https://en.wikipedia.org/wiki/Iterator_pattern}
|
- External Iterator Pattern documentation: U{https://en.wikipedia.org/wiki/Iterator_pattern}
|
||||||
"""
|
"""
|
||||||
def __init__(self, iterable):
|
def __init__(self, iterable):
|
||||||
@@ -28,7 +28,7 @@ class Iterable(object, metaclass=ABCMeta):
|
|||||||
"""
|
"""
|
||||||
An abstract class representing an Iterable object as part of the Iterator design pattern.
|
An abstract class representing an Iterable object as part of the Iterator design pattern.
|
||||||
|
|
||||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#iterator-pattern}
|
||||||
- External Iterator Pattern documentation: U{https://en.wikipedia.org/wiki/Iterator_pattern}
|
- External Iterator Pattern documentation: U{https://en.wikipedia.org/wiki/Iterator_pattern}
|
||||||
"""
|
"""
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class Mediator(object):
|
|||||||
"""
|
"""
|
||||||
Mediator class as part of the Mediator design pattern.
|
Mediator class as part of the Mediator design pattern.
|
||||||
|
|
||||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#mediator-pattern}
|
||||||
- External Mediator Pattern documentation: U{https://en.wikipedia.org/wiki/Mediator_pattern}
|
- External Mediator Pattern documentation: U{https://en.wikipedia.org/wiki/Mediator_pattern}
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class Memento(object):
|
|||||||
"""
|
"""
|
||||||
Memento class as part of the Memento design pattern.
|
Memento class as part of the Memento design pattern.
|
||||||
|
|
||||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#memento-pattern}
|
||||||
- External Memento Pattern documentation: U{https://en.wikipedia.org/wiki/Memento_pattern}
|
- External Memento Pattern documentation: U{https://en.wikipedia.org/wiki/Memento_pattern}
|
||||||
"""
|
"""
|
||||||
def __init__(self, state):
|
def __init__(self, state):
|
||||||
@@ -26,7 +26,7 @@ class Originator(object):
|
|||||||
"""
|
"""
|
||||||
Originator base class as part of the Memento design pattern.
|
Originator base class as part of the Memento design pattern.
|
||||||
|
|
||||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#memento-pattern}
|
||||||
- External Mediator Pattern documentation: U{https://en.wikipedia.org/wiki/Memento_pattern}
|
- External Mediator Pattern documentation: U{https://en.wikipedia.org/wiki/Memento_pattern}
|
||||||
"""
|
"""
|
||||||
def commit(self):
|
def commit(self):
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ class Null(object):
|
|||||||
"""
|
"""
|
||||||
A Null object class as part of the Null object design pattern.
|
A Null object class as part of the Null object design pattern.
|
||||||
|
|
||||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#null-object-pattern}
|
||||||
- External Null Object Pattern documentation: U{https://en.wikipedia.org/wiki/Null_Object_pattern}
|
- External Null Object Pattern documentation: U{https://en.wikipedia.org/wiki/Null_Object_pattern}
|
||||||
"""
|
"""
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class Observer(object, metaclass=ABCMeta):
|
|||||||
"""
|
"""
|
||||||
Abstract Observer class as part of the Observer design pattern.
|
Abstract Observer class as part of the Observer design pattern.
|
||||||
|
|
||||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#observer-pattern}
|
||||||
- External Observer Pattern documentation: U{https://en.wikipedia.org/wiki/Observer_pattern}
|
- External Observer Pattern documentation: U{https://en.wikipedia.org/wiki/Observer_pattern}
|
||||||
"""
|
"""
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
@@ -20,7 +20,7 @@ class Observable(object):
|
|||||||
"""
|
"""
|
||||||
Base Observable class as part of the Observer design pattern.
|
Base Observable class as part of the Observer design pattern.
|
||||||
|
|
||||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#observer-pattern}
|
||||||
- External Observer Pattern documentation: U{https://en.wikipedia.org/wiki/Observer_pattern}
|
- External Observer Pattern documentation: U{https://en.wikipedia.org/wiki/Observer_pattern}
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class Visitor(metaclass=ABCMeta):
|
|||||||
"""
|
"""
|
||||||
Abstract Visitor class as part of the Visitor Design Pattern.
|
Abstract Visitor class as part of the Visitor Design Pattern.
|
||||||
|
|
||||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#visitor-pattern}
|
||||||
- External Visitor Design Pattern documentation: U{https://en.wikipedia.org/wiki/Visitor_pattern}
|
- External Visitor Design Pattern documentation: U{https://en.wikipedia.org/wiki/Visitor_pattern}
|
||||||
"""
|
"""
|
||||||
def visit(self, node, *args, **kwargs):
|
def visit(self, node, *args, **kwargs):
|
||||||
@@ -19,7 +19,7 @@ class Visitor(metaclass=ABCMeta):
|
|||||||
"""
|
"""
|
||||||
method = None
|
method = None
|
||||||
for cls in node.__class__.__mro__:
|
for cls in node.__class__.__mro__:
|
||||||
method_name = 'visit_'+cls.__name__.lower()
|
method_name = 'visit_' + cls.__name__.lower()
|
||||||
method = getattr(self, method_name, None)
|
method = getattr(self, method_name, None)
|
||||||
if method:
|
if method:
|
||||||
break
|
break
|
||||||
@@ -43,7 +43,7 @@ class Visitee(object):
|
|||||||
"""
|
"""
|
||||||
A base class for objects that wish to be able to be visited by a Visitor class.
|
A base class for objects that wish to be able to be visited by a Visitor class.
|
||||||
|
|
||||||
- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Behavioral-Pattern-Usage}
|
- External Usage documentation: U{https://github.com/tylerlaberge/PyPattyrn#behavioral-patterns}
|
||||||
- External Visitor Design Pattern documentation: U{https://en.wikipedia.org/wiki/Visitor_pattern}
|
- External Visitor Design Pattern documentation: U{https://en.wikipedia.org/wiki/Visitor_pattern}
|
||||||
"""
|
"""
|
||||||
def accept(self, visitor, *args, **kwargs):
|
def accept(self, visitor, *args, **kwargs):
|
||||||
|
|||||||
Reference in New Issue
Block a user