[Python-3000] What to do about "".join([b""])?

Guido van Rossum guido at python.org
Fri Nov 2 04:15:39 CET 2007


On 11/1/07, Facundo Batista <facundobatista at gmail.com> wrote:
> > 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'

Ah, but now try it in the py3k-pep3137 trunk...

Python 3.0a1+ (py3k-pep3137, Nov  1 2007, 19:17:57)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> str(b"hola")
"b'hola'"


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list