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

Martin v. Loewis martin@v.loewis.de
16 Oct 2002 16:31:38 +0200


"M.-A. Lemburg" <mal@lemburg.com> writes:

> Except one which was implicit: how to tell binary data from
> text data. 

I see. In this case,

class BinaryString(str):
  pass

should do. The string type *is* the type for binary data. For
character data, unicode is the type.

Regards,
Martin