From the course: Python: Programming Efficiently

Unlock the full course today

Join today to access over 23,300 courses taught by industry experts.

Divide and conquer with Python classes

Divide and conquer with Python classes - Python Tutorial

From the course: Python: Programming Efficiently

Divide and conquer with Python classes

- [Tutor] Python takes a very easy going yet powerful approach to object oriented and functional programming. This makes it easy to start using these techniques, but it gives you great flexibility and power once you move beyond the basics. We start with objects. In Class-Based object oriented languages, such as Python, individual objects are instances of classes. Much like individual animals are representative of a species. The class defines data members and behaviors commons to all instances. Each instance has its own identity. It is created and eventually destroyed, and it holds its own data values. The data elements of an object are known as attributes while associated functions are known as methods. When we call a method on an instance, we mean that we call a function defined within the class in such a way that it uses the data members of that particular instance. But rather than explain all of these own contrived…

Contents