[issue35174] Calling for super().__str__ seems to call self.__repr__ in list subclass

2021-10-25 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue35174] Calling for super().__str__ seems to call self.__repr__ in list subclass

2018-11-06 Thread Camion
Camion added the comment: @Serhiy Storchaka, this doesn't seem logical, is certainly counter intuitive, and I fear there is a lack of expressivity. - first of all, this is NOT about having str and repr returning the same at all, but about building the same _kind of_ structure

[issue35174] Calling for super().__str__ seems to call self.__repr__ in list subclass

2018-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: list inherits __str__ from object. object.__str__() calls __repr__() which can be overridden in subclasses. So if you want repr() and str() returned the same, you need to define only the __repr__() method. This is a feature, not a bug. -- nosy:

[issue35174] Calling for super().__str__ seems to call self.__repr__ in list subclass

2018-11-05 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Adding the related StackOverflow question here for some context : https://stackoverflow.com/questions/53156623/calling-for-super-str-seem-to-call-self-repr-in-list-subclass Thanks -- nosy: +xtreak ___

[issue35174] Calling for super().__str__ seems to call self.__repr__ in list subclass

2018-11-05 Thread Camion
New submission from Camion : I don't know if this is by design (for what reason ?) or if it is a bug, but I have noticed this quite counter-intuitive behaviour : Doing that, it seems that the logical way to make the __repr__ and __str__ methods, would be to override respectively the parent