text: Created on 2012-11-03 18:13 by Jorge.Cardona, last changed 2019-12-09 00:53 by pschanely. This issue is now closed.
  Hi,
  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
  '.'.join([UserString('some')])
  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.
  Bye.
  This is not a bug, but a potential new feature. Therefore, it can go only into 3.4 (if at all).
  If you want a class that behaves like a string object, you should subclass from str.
  mm, I thought that was impossible, and that I should be using UserString
  actually. I didn't notice the big warning at the beginning of the section
  at the docs.
  Sorry, I will change my code.
  Thanks.
  On Sat, Nov 3, 2012 at 2:33 PM, Martin v. Löwis <report@bugs.python.org>wrote:
  >
  > Martin v. Löwis added the comment:
  >
  > If you want a class that behaves like a string object, you should subclass
  > from str.
  >
  > ----------
  >
  > _______________________________________
  > Python tracker <report@bugs.python.org>
  > <>
  > _______________________________________
  >
  --
  Jorge Eduardo Cardona
  jorgeecardona@gmail.com
  jorge@cardona.co
  cardona.co
  github.com/jorgeecardona
  Jorge, can we close this or do you still have a specific suggestion.
  Also, if you reply by mail, please snip previous messages as they are already posted.
  Hi, this can be closed.
  Thanks.