Re: struct.unpack: why 's' fmt char convert to bytestring

2014-05-15 Thread MRAB
On 2014-05-15 13:34, GuoChao wrote: T he Python documentation gives this same example: record = b'raymond\x32\x12\x08\x01\x08' name, serialnum, school, gradelevel = unpack('<10sHHb', record) but get different results as to 's', don't kn

Re: struct.unpack: why 's' fmt char convert to bytestring

2014-05-15 Thread Dave Angel
On 05/15/2014 08:34 AM, GuoChao wrote: The Python documentation gives this same example:>>> record = b'raymond \x32\x12\x08\x01\x08' name, serialnum, school, gradelevel = unpack('<10sHHb', record) but get different results as to 's', don't know why this change in Python 3? need extra work