special methods
Table of Contents
1. Special methods
The special methods make user defined objects behave as built in
types. Using them makes the code more "Pythonic". A basic
requirement of Python object is to provide usable string
representaiton using __repr__
and __str__
.
??? Is this correct?
__repr__
: Used for debugging.__str__
: Used for presentation to the end user.