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 rhettinger
Recipients bizywizy, eric.smith, rhettinger
Date 2020-01-17.04:32:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1579235560.04.0.0309965226495.issue39354@roundup.psfhosted.org>
In-reply-to
Content
It is too late is the life of UserString for a design change, so I'm going to have to close this as more likely to harm existing code than to benefit future code.

Also, despite you expectations, this isn't atypical for Python classes.  For example, the __add__ method on integer subclasses returns actual ints rather than instances of the subclass.

In the case of UserString, the current design can be useful because it make UserString instances more substitutable for regular strings.
History
Date User Action Args
2020-01-17 04:32:40rhettingersetrecipients: + rhettinger, eric.smith, bizywizy
2020-01-17 04:32:40rhettingersetmessageid: <1579235560.04.0.0309965226495.issue39354@roundup.psfhosted.org>
2020-01-17 04:32:39rhettingerlinkissue39354 messages
2020-01-17 04:32:39rhettingercreate