[Python-Dev] Re: adding a bytes sequence type to Python
"Martin v. Löwis"
martin at v.loewis.de
Sun Aug 29 02:06:54 CEST 2004
Skip Montanaro wrote:
> >>> b[3] = '\xfe'
I think you meant to write
b[3] = 0xfe # or byte(0xfe)
here. Assigning to an index always takes the element type in
Python. It's only strings where reading an index returns the
container type.
> >>> b += "\xfe"
And here, you probably meant to write
b += bytes("\xfe")
Regards,
Martin
More information about the Python-Dev
mailing list