[EMAIL PROTECTED] (Alex Martelli) writes:
> But why can't I have perfectly polymorphic "append a bunch of strings
> together", just like I can now (with ''.join of a list of strings, or
> StringIO), without caring whether the strings are Unicode or
> bytestrings?

I see that 'a' + u'b' = u'ab', which makes sense.  I don't use Unicode
much so haven't paid much attention to such things.  Is there some
sound reason cStringIO acts differently from StringIO?  I'd expect
them to both do the same thing.

> As for extending cStringIO.write I guess that's
> possible, but not without breaking compatibility ... you'd
> need instead to add another couple of methods, or wait for Py3k.

We're already discussing adding another method, namely __iadd__.
Maybe that's the place to put it.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to