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 josh.r
Recipients gregory.p.smith, josh.r, serhiy.storchaka
Date 2019-05-05.21:59:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I like this. Always annoying to explicitly override both __repr__ and __str__ on subclasses of stuff like int when they should be the same. Patch looks good to me; I was originally wondering why some classes were replacing:

__str__ = __repr__


__str__ = object.__str__

but checking their inheritance chains, it's clear *some* overload is needed for consistency, and using object.__str__ means reverting to the default case where subclasses only need to overload __repr__, rather than forcing all subclasses to overload both.
Date User Action Args
2019-05-05 21:59:55josh.rsetrecipients: + josh.r, gregory.p.smith, serhiy.storchaka
2019-05-05 21:59:55josh.rsetmessageid: <>
2019-05-05 21:59:55josh.rlinkissue36793 messages
2019-05-05 21:59:55josh.rcreate