Mastering Objectoriented Python
上QQ阅读APP看书,第一时间看更新

Summary

We've looked at one of our sample problem domains: the casino game of Blackjack. We like it because it has some algorithmic complexity, but isn't too sophisticated or esoteric. We've also introduced three important modules that we'll be using throughout the book:

  • The timeit module is something we'll use to compare performance of alternative implementations
  • The unittest and doctest modules will be used to confirm that our software works correctly

We've also looked at some of the ways we'll add documentation to our Python programs. We'll be using docstrings in modules, classes, and functions. To save space, not every example will show the docstrings. In spite of this, they should be considered as essential.

The use of an integrated development environment (IDE) isn't essential. Any IDE or text editor that works for you will be fine for advanced Python development.

The eight chapters which follow will address different subsets of the special method names. These are about how we'll create our own Python programming that integrates seamlessly with the built-in library modules.

In the next chapter, we'll focus on the __init__() method and the various ways we can use it. The __init__() method is profound because initialization is the first big step in an object's life; every object must be initialized properly to work properly. More important than that, the argument values for __init__() can take on many forms. We'll look at a variety of ways to design __init__().