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

Guido van Rossum guido at python.org
Fri Nov 2 15:20:55 CET 2007


OK, that's what I'll do. I was never really comfortable with it, and
now I know why.

On 11/2/07, Chris Monson <shiblon at gmail.com> wrote:
> +1 on removing implicit str calls from join altogether.
>
>
> On 11/2/07, Adam Hupp <adam at hupp.org> wrote:
> > On 11/1/07, Guido van Rossum <guido at python.org> wrote:
> >
> > > 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?
> >
> > +1 on removing bytes-specific behavior from join.  Whatever the
> > behavior is it should be consistent.
> >
> > I prefer removing the str call on .join entirely.  Is there any other
> > string method that implicitly str's it's argument?  I can't think of
> > any.   If this works I would expect that concatenation also implicitly
> > converts (ala java).
> >
> >
> > --
> > Adam Hupp | http://hupp.org/adam/
> > _______________________________________________
> > Python-3000 mailing list
> > Python-3000 at python.org
> > http://mail.python.org/mailman/listinfo/python-3000
> > Unsubscribe:
> > http://mail.python.org/mailman/options/python-3000/shiblon%40gmail.com
> >
>


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


More information about the Python-3000 mailing list