Good, good Python OOP
Miscellaneous / / December 04, 2023
The basis of this course is made up of tasks that are as close as possible to the real combat ones that every beginning programmer in IT companies faces. The wording of the tasks is close to the style of technical specifications, which you may also encounter when working on orders. As a result, not only programming practice is gained, but also the correct perception of typical technical tasks.
In the course, step by step, starting with the simplest constructs (classes, objects, methods), you will immerse yourself in the fascinating world of OOP. At the beginning of each lesson, theoretical video material is given, which is then reinforced with a set of practical tasks (feats). At the end of some sections it is proposed to pass a test - the development of a full-fledged program that allows you to fully come into contact with OOP.
By patiently studying all the lessons of this course, you will be able to feel (touch) this unusual, at first glance, concept of programming with classes and objects. You will understand its capabilities and will be able to use this initial experience and knowledge in your projects, developing further in this direction.
Telegram channel for discussion: https://t.me/python_selfedu
Continuation: course on data structures: https://stepik.org/course/134212/
First steps in OOP
1. How to complete course assignments correctly
2. OOP concept in simple words
3. Classes and objects. Attributes of classes and objects
4. Class methods. Parameter self
5. __init__ initializer and __del__ finalizer
6. Magic method __new__. Singleton pattern example
7. Class methods (classmethod) and static methods (staticmethod)
8. Test properties and methods
Access modes, properties and descriptors
1. Access modes public, private, protected. Setters and getters
2. Properties property. Decorator @property
3. Descriptors (data descriptor and non-data descriptor)
Magic class methods
1. Methods __setattr__, __getattribute__, __getattr__ and __delattr__
2. Method __call__. Functors and decorator classes
3. Methods __str__, __repr__, __len__, __abs__
4. Methods __add__, __sub__, __mul__, __truediv__
5. Comparisons __eq__, __ne__, __lt__, __gt__ and others
6. Methods __eq__ and __hash__
7. __bool__ method
8. Methods __getitem__, __setitem__ and __delitem__
9. Methods __iter__ and __next__
10. Trial of Magic
Inheritance and polymorphism
1. Inheritance in object-oriented programming
2. issubclass() function. Inheritance from built-in types
3. Inheritance. super() function and delegation
4. Inheritance. Private and protected attributes
5. Polymorphism and abstract methods
6. Multiple inheritance
7. Collection __slots__
8. Burden of Legacy Challenge
Exceptions and context managers
1. Introduction to exception handling. Try/except blocks
2. Exception Handling. Finally and else blocks
3. Propagation exceptions
4. raise statement and custom exceptions
5. Context managers. The with statement
6. Initiation into object-oriented programming