Summary

In this chapter, we've surveyed the game of Blackjack. The rules have a moderate level of complexity, providing a framework for creating a simulation. Simulation was one of the first uses for OOP and remains a rich source of programming problems that illustrate language and library strengths.

This chapter introduces the way the Python runtime uses special methods to implement the various operators. The bulk of this book will show ways to make use of the special methods names for creating objects that interact seamlessly with other Python features.

We've also looked at a number of tools that will be required to build good Python applications. This includes the IDE, the mypy program for checking type hints, and the black and pylint programs for getting to a consistent style. We also looked at the timeit, unittest, and doctest modules for doing essential performance and functional testing. For final documentation of a project, it's helpful to install sphinx. The installation of these extra components can be done with pip or conda. The pip tool is part of Python, the conda tool requires another download to make it available.

In the next chapter, we'll start our exploration of Python with class definition. We'll focus specifically on how objects are initialized using the __init__() special method.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset