2007/11/1, Guido van Rossum <[EMAIL PROTECTED]>: > 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
I'd prefer to *always* apply the str() function: simpler, no except when teaching it, always the same behaviour. > uniformly apply str(), which for bytes returns a string of the form > "b'...'" or "buffer(b'...')" (depending on whether the bytes are Don't understand... From the trunk: Python 3.0a1+ (py3k:58762, Nov 1 2007, 21:17:44) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> str(b"hola") 'hola' > immutable or not). Given that we killed the exception for "" == b"" > earlier, I'm tempted to remove the exception. Any opinions to the > contrary? +1 to remove the exception Regards, -- . Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ _______________________________________________ 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
