Jaaved Ali Khan

21%
Flag icon
The two audiences for strings generated by objects, you and your client, are often in conflict. You want all the internal, structural details of your object laid out in one place so you don’t have to go searching layers and layers of objects to find what you want. Your client assumes the object is working correctly and just wants to see externally relevant aspects of the object in the string.
Jaaved Ali Khan
Indirectly this give the reason why in python __repr__ and __str__ methods are needed.
Smalltalk Best Practice Patterns
Rate this book
Clear rating
Open Preview