Camion <camion_spam-pyb...@yahoo.com> 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 representations for str 
and repr, but with str of sub elements in __str__, and with repr of sub 
elements in __repr__.

It is not logical at all and completely counter intuitive, if you explicitely 
ask str of the superclass, to get repr of the subclass. Getting repr of the 
superclass would be logical, but not repr of the subclass.

Now, it might happen that I missed another way to write what I tried (casting 
the object to it's super class with super(), to avoid explicitly naming the 
superclass) but if there is not, we then have something lacking in terms of 
expressivity.

----------
resolution: not a bug -> 
status: closed -> open

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35174>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to