Abstract Factories In Python
Learn about the usage of the Abstract Factory pattern in Python.
We'll cover the following...
Conceptualizing Abstract Factory without a base class
The example in the previous lesson highlights an interesting consequence of the way Python’s duck typing works. Do we really need the abstract base class, CardGameFactory
? It provides a framework used for type checking but otherwise doesn’t have any useful features. Since we don’t really need it, we can think of this design as having three parallel modules:
Press + to interact
Both of the defined games implement a ...