[Python-Dev] buffer('abc') == 'abc' is False ?!

Martin v. Loewis martin@v.loewis.de
16 Oct 2002 19:11:21 +0200


Guido van Rossum <guido@python.org> writes:

> > Would be nice if there were a standard builtin, e.g. binary(),
> > for this and maybe some support code to go with it in C (e.g.
> > the type object would be nice to have at C level).
> 
> I disagree.  There are a thousand different applications, and yours
> seems rather unusual to me.

I do think there should be a string type for binary data, and that the
standard string type should become Unicode one day. There was past
discussion about this, at which proponents suggest that there should
be even binary literals.

Of course, all I/O would use the binary, unless an encoding was
specified when creating the stream.

Regards,
Martin