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 str
is a type that is unicode. In python2.x, str
is a type representing bytes.
source
share