2008/6/26 Georg Brandl <[EMAIL PROTECTED]>: > Yes. Bytes objects are sequences of bytes, which are integers. > So, in short, this is the way they work.
I think that the OP confusion comes from the representation. We have a data type called bytes. They are sequences of bytes. So, I build one: >>> b = bytes((72, 105)) Then I check: >>> b[0] 72 >>> b[1] 105 Great! But: >>> b b'Hi' Why I see two letters? Wasn't them bytes? :o I know that is great to represent bytes between 32 and 127 as letters, and this has several compatibility details, but I think that the surprise comes from that place. If the behaviour were the following.... >>> b b((72, 105)) ...it would be less surprising. Regards, -- . Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com