Python
Object-Oriented Python
Learn classes, special methods, inheritance and exceptions, and see how the libraries you use are built.
Start the trackFree, no sign-up needed
What you'll learn
- Your first classData and behavior in one place
- An object that describes itselfrepr for developers, str for users
- When are two objects equal?Dict keys and set members
- A class that acts like a listlen, in and for on your own class
- Data classesWrite the fields, let Python write the rest
- A class that inherits from anotherAdd your rule, leave the rest to the parent
- A property that checks its valueEvery new value goes through the check
- Alternative constructorsA clearly named constructor for each kind of input
- Your own exceptionsCatch only what you can handle
- Guaranteed cleanupThe with statement guarantees cleanup, whatever happens
Track contents
10 lessons, 2 hours in total- 1Your first classPythonData and behavior in one place13 min
- 2An object that describes itselfPythonrepr for developers, str for users11 min
- 3When are two objects equal?PythonDict keys and set members13 min
- 4A class that acts like a listPythonlen, in and for on your own class14 min
- 5Data classesPythonWrite the fields, let Python write the rest13 min
- 6A class that inherits from anotherPythonAdd your rule, leave the rest to the parent14 min
- 7A property that checks its valuePythonEvery new value goes through the check13 min
- 8Alternative constructorsPythonA clearly named constructor for each kind of input12 min
- 9Your own exceptionsPythonCatch only what you can handle14 min
- 10Guaranteed cleanupPythonThe with statement guarantees cleanup, whatever happens15 min
More Python tracks
All tracks- PyBeginner
Python Basics
Start with the most beginner-friendly language there is, and use it to learn variables, strings, lists, conditions, loops and functions.
10 lessons2 hours - PyIntermediate
Data processing in Python
Learn to process real data in Python with comprehensions, dictionaries, sorting and counting.
10 lessons2 hours