Package pypat :: Package creational :: Module prototype :: Class Prototype
[hide private]
[frames] | no frames]

Class Prototype

source code

object --+
         |
        Prototype


Prototype design pattern abstract class.

- External Usage documentation: U{https://github.com/tylerlaberge/PyPatterns/wiki/Creational-Pattern-Usage}
- External Prototype Pattern documentation: U{https://en.wikipedia.org/wiki/Prototype_pattern}

Instance Methods [hide private]
 
prototype(self, **attributes)
Copy the prototype this object and optionally update attributes.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

prototype(self, **attributes)

source code 

Copy the prototype this object and optionally update attributes.

Parameters:
  • attributes - Keyword arguments of any attributes you wish to update.
Returns:
A copy of this object with the updated attributes.