Serhiy Storchaka added the comment: "unpack requires a bytes-like object of length %zd" is not correct too. array.array('i', [1, 2, 3]) has length 3, but Struct('3b').unpack doesn't accept it. The more correct error message is "unpack requires an object containing %zd bytes" (or "a buffer"). The similar issue was discussed some time ago, but I don't remember what module was discussed and who participated in that discussion.
---------- nosy: +berker.peksag, mark.dickinson, martin.panter, meador.inge, r.david.murray, serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30246> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com