-1 on having "".join() call str at all.  yuck.  shouldn't the caller just
write:

 "".join((str(x) for x in thing))

when they desire guaranteed stringification instead of a TypeError?

Anyways others disagree and this was already implemented so I assume my -1
is rejected, I at least agree on this:

+1 get rid of the inconsistent TypeError if a bytes or buffer object is in
the list.  thats inconsistent.  inserting the b'' or buffer(b'') syntax is
the consistent thing to do in that situation.

-gps

On 11/1/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
>
> Currently (in 3.0), "".join(<seq>) automatically applies str() to the
> items of <seq>, *except* if the item is a bytes instance -- then it
> raises a TypeError. Is that proper behavior? The alternative is to
> uniformly apply str(), which for bytes returns a string of the form
> "b'...'" or "buffer(b'...')" (depending on whether the bytes are
> immutable or not). Given that we killed the exception for "" == b""
> earlier, I'm tempted to remove the exception. Any opinions to the
> contrary?
>
> --
> --Guido van Rossum (home page: http://www.python.org/~guido/)
> _______________________________________________
> Python-3000 mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/python-3000
> Unsubscribe:
> http://mail.python.org/mailman/options/python-3000/greg%40krypto.org
>
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to