Summary

In this chapter, we learned how simple it is to create classes and assign properties and methods in Python. We also covered access control and different levels of scope (packages, modules, classes, and functions). In particular, we covered:

  • Class syntax
  • Attributes and methods
  • Initializers and constructors
  • Modules and packages
  • Relative and absolute imports
  • Access control and its limitations

In the next chapter, we'll learn how to share implementation using inheritance.

Get Python 3 Object Oriented Programming 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.