/ Design Patterns / Creational patterns / Prototype Prototype Design Pattern in Python Back to Prototype description """ Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype. """ import copy class Prototype: """ Example class to be copied. """ pass def main(): prototype = Prototype() prototype_copy = copy.deepcopy(prototype) if __name__ == "__main__": main() Support our free website and own the eBook! 22 design patterns and 8 principles explained in depth 406 well-structured, easy to read, jargon-free pages 228 clear and helpful illustrations and diagrams An archive with code examples in 4 languages All devices supported: EPUB/MOBI/PDF formats Learn more...