Advanced Python: Object-Oriented Programming
1h 21mAdvanced2024-03-22
Authors

Miki Tebeka
CEO at 353Solutions
Course details
In this advanced course, Miki Tebeka, the CEO at 353Solutions, guides you through object-oriented programming features in Python. Learn about attribute access and how to use properties, name mangling, descriptors, and more. Explore using class methods, static methods, mixin classes, and abstract base classes. Dive into sequences, mappings, numbers, and callable types. Find out what metaclasses are and how you can use them. Plus, go over class creation utilities that you’ll need to use. Each chapter comes with a hands-on challenge to practice and reinforce what you learn.
Skills covered
Object-Oriented ProgrammingPythonProgramming LanguagesOpen SourceSoftware DevelopmentOne-Off
Concepts
0. Introduction
- 01 - Advanced object oriented programming (OOP)
- 02 - What you should know
- 03 - Using Codespaces
1. Attribute Access
- 04 - Deconstructing attribute access
- 05 - Using properties
- 06 - Programmatic attribute access
- 07 - Reducing memory with slots
- 08 - Name mangling
- 09 - Descriptors
- 10 - Challenge - Colors
- 11 - Solution - Colors
2. Methods
- 12 - Using class methods
- 13 - Using static methods
- 14 - Mixin classes
- 15 - Abstract base classes
- 16 - Defining interfaces with typing.Protocol
- 17 - Challenge - Event from JSON
- 18 - Solution - Event from JSON
3. Special Methods
- 19 - String representations
- 20 - Sequences
- 21 - Mappings
- 22 - Numbers
- 23 - Callable
- 24 - Challenge - Database-backed dictionary
- 25 - Solution - Database-backed dictionary
4. Metaclasses
- 26 - What are metaclasses
- 27 - Class creation
- 28 - Instance creation
- 29 - Attribute lookup
- 30 - Challenge - Singleton
- 31 - Solution - Singleton
5. Class Creation Utilities
- 32 - Class decorators
- 33 - namedtuple()
- 34 - dataclass()
- 35 - Freezing
- 36 - Challenge - VM class
- 37 - Solution - VM class
Conclusion
- 38 - Next steps