Optional: good to know Step 10 of 16 on the Python Developer roadmap
Special methods
Methods like __str__ and __eq__ control how your objects print and compare. A friendly __str__ makes debugging much more pleasant.
Optional: good to know Step 10 of 16 on the Python Developer roadmap
Methods like __str__ and __eq__ control how your objects print and compare. A friendly __str__ makes debugging much more pleasant.