September 2016
Intermediate to advanced
454 pages
9h 23m
English
In the previous section, we redesigned the code using the OOP approach. We also demonstrated the use of inheritance by defining a superclass GameUnit, and inheriting from it to create the Knight and OrcRider subclasses. As the last topic in this chapter, let's talk about using abstract base classes in Python.
This section is intended to provide a basic understanding of ABCs in Python. The discussion here is far from being comprehensive but will be just enough to implement an ABC in our application code. For further reading, check out the Python documentation at https://docs.python.org/3/library/abc.html.
If you are familiar with OOP languages such as Java or C++, you probably already know the concept of an ABC. ...
Read now
Unlock full access