pprint_thing for sequences
I am using a custom dataclass as in the index of a DataFrame, which works fine. However, since it implements the Sequence protocol, pprint_thing is rendering every element, rather than the object itself. I would rather use the __str__ method that I have written. I know I can avoid this by changing "pprint_nest_depth" option to 0, but it would be nice to have a direct way of achieving this.

My main question is why the presence of a "__next__" attribute is used as the indicator that the correct output is the result of "str" (
https://github.com/pandas-dev/pandas/blob/cfd65e98e694b2ad40e97d06ffdd9096a3dea909/pandas/io/formats/printing.py#L207)

This is related to #17695, #18843 and #22333.