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 - 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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Object-oriented and functional Python1m 51s
-
(Locked)
Divide and conquer with Python classes6m 35s
-
(Locked)
Exploit class inheritance5m 58s
-
(Locked)
Functional techniques in Python6m
-
Function decorators5m 31s
-
(Locked)
Challenge: Bale of turtles2m 29s
-
(Locked)
Solution: Bale of turtles3m 8s
-
(Locked)
-
-