Kahibaro
Discord Login Register

Chapter 13: Object-Oriented Programming

So far, you’ve written programs as a series of steps: read some data, do some calculations, print results. This is called a procedural style.

Object-oriented programming (OOP) is a different way of organizing your code. Instead of just thinking in terms of steps, you think in terms of things (objects) and what they can do (methods) and what they know (attributes).

OOP is especially useful when:

At the core of OOP in Python are:

The rest of this chapter introduces each of these ideas with simple, concrete examples.

Views: 17

Comments

Please login to add a comment.

Don't have an account? Register now!