Python Developer — Medium
Key points
- __str__ for human-readable output
- __repr__ for unambiguous developer-facing representation
- __repr__ should ideally recreate the object
- __str__ focuses on readability
Ready to go further?
Related questions
Python Developer — Medium
Key points
Ready to go further?
Related questions