
Dec. 19, 2022
12:36 p.m.
On Mon, Dec 19, 2022 at 01:02:02AM -0600, Shantanu Jain wrote:
collections.UserString can take away a lot of this boilerplate pain from user defined str subclasses.
At what performance cost? Also:
s = collections.UserString('spam and eggs') isinstance(s, str) False
which pretty much makes UserString useless for any code that does static checking or runtime isisinstance checks. In any case, I was making a larger point that this same issue applies to other builtins like float, int and more. -- Steve