[New-bugs-announce] [issue16397] UserString doesn't combine nicely with strings

Jorge Cardona report at bugs.python.org
Sat Nov 3 19:13:13 CET 2012

New submission from Jorge Cardona:


I think UserString must play nicely with other standard objects to be useful. For example, right now is not possible to join a list of UserString with a string. 

This shouldn't fail:

   from UserString import UserString

but it fails in 2.7 and it fails too with 3.2 (replacing with collections).

I'm assuming most of the user of UserString, use it as a replacement of a string, and it would be great to actually be able to replace strings passed to thid parties with userstrings. 

I imagine there would be some edge situations harder to resolve, but if someone is just using standard libraries it should be safe to pass a string or an userstring.


messages: 174658
nosy: Jorge.Cardona
priority: normal
severity: normal
status: open
title: UserString doesn't combine nicely with strings
type: behavior
versions: Python 2.7, Python 3.2

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list