Type str(for python2.x and python3.x):
>>> type(repr(object()))
<class 'str'>
This should be so, because __str__by default it calls __repr__if the first is not present, but __str__should return str.
For those who don’t know, in python3.x stris a type that is unicode. In python2.x, stris a type representing bytes.
source
share