Your primary source of information on this is http://hg.python.org/cpython/file/tip/Objects
For example, in boolobject.c
:
PyTypeObject PyBool_Type = {
...stuff...
bool_repr, /* tp_repr */
...stuff...
bool_repr, /* tp_str */
so yes, they're guaranteed to be the same.
For floats, float_repr
is different from float_str
and depends on sys.float_repr_style
.