This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Camion
Recipients Camion, serhiy.storchaka, xtreak
Date 2018-11-06.11:59:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1541505582.35.0.788709270274.issue35174@psf.upfronthosting.co.za>
In-reply-to
Content
@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.
History
Date User Action Args
2018-11-06 11:59:42Camionsetrecipients: + Camion, serhiy.storchaka, xtreak
2018-11-06 11:59:42Camionsetmessageid: <1541505582.35.0.788709270274.issue35174@psf.upfronthosting.co.za>
2018-11-06 11:59:42Camionlinkissue35174 messages
2018-11-06 11:59:42Camioncreate