Chapter 18: Other Creational Patterns

In the previous chapter, we covered a third creational pattern, builder, which offers a nice way of creating the various parts of a complex object. Apart from the factory method, the abstract factory, and the builder patterns covered so far, other creational patterns are interesting to discuss, such as the prototype pattern and the singleton pattern.

In this chapter, we will discuss the following topics:

  • Implementing the prototype pattern
  • Implementing the singleton pattern

These topics will complete our discussions on creational patterns and help cover the use cases where the design patterns we have seen so far are not appropriate. By the end of the chapter, we will have an overall understanding of creational ...

Get Advanced Python Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.