Covers Python's special or magic methods, their purpose and the overall pattern.
This is the 7th video of tutorial series on Object oriented programming in Python: • Python OOP | Intermediate level
0:00 Introduction
1:04 Documentation
1:15 _repr_
2:25 _str_
3:18 _repr_ vs _str_
4:39 _len_
5:09 _bool_
6:50 Arithmetic Operators
8:38 Reflected arithmetic operators
10:06 Augmented arithmetic operators
11:57 Rich comparison operators
13:11 Reflections of rich comparison operators
14:12 total_ordering decorator
14:51 _hash_
16:30 _call_
17:17 Implementing "partial"
19:18 Conclusion
Credits: The contents of this video are mostly from my notes on Dr. Fred Baptiste's course https://www.udemy.com/course/python-3-deep-dive-part-4/
11 Comments