Learn to control the way that objects interact with the Python language syntax and built-in functions.
Magic methods allow user-defined objects to behave more like built-in objects. They allow objects to interact with the runtime and language syntax in a more Pythonic manner. This lab covers commonly used magic methods through hands-on learning.
Learning Objectives:
__init____str____int____float____repr____eq____lt____gt____le____ge____bool____len__Prerequisites:
Familiar with:
Proficient with: