Terry J. Reedy added the comment: For 3.3, I verified that adding b prefix to first three doc examples gives same output as without, but also discovered that example outputs are wrong, at least on windows, because of byte ordering issues.
>>> pack('hhl', 1, 2, 3) b'\x01\x00\x02\x00\x03\x00\x00\x00' >>> pack(b'hhl', 1, 2, 3) b'\x01\x00\x02\x00\x03\x00\x00\x00' >>> unpack(b'hhl', b'\x00\x01\x00\x02\x00\x00\x00\x03') (256, 512, 50331648) >>> unpack('hhl', b'\x00\x01\x00\x02\x00\x00\x00\x03') (256, 512, 50331648) ---------- nosy: +mark.dickinson, meador.inge, terry.reedy _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16349> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com