New submission from Antoine Pitrou: For certain applications, you want to unpack repeatedly the same pattern. This came in issue17618 (base85 decoding), where you want to unpack a stream of bytes as 32-bit big-endian unsigned ints. The solution adopted in issue17618 patch (struct.Struct("!{}I")) is clearly suboptimal.
I would suggest something like a iter_unpack() function which would repeatedly yield tuples until the bytes object is over. ---------- components: Library (Lib) messages: 187455 nosy: mark.dickinson, meador.inge, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: streaming struct unpacking type: enhancement versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17804> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com