Author pitrou
Recipients mark.dickinson, meador.inge, pitrou, serhiy.storchaka
Date 2013-04-20.20:33:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1366490003.51.0.571307288216.issue17804@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-04-20 20:33:23pitrousetrecipients: + pitrou, mark.dickinson, meador.inge, serhiy.storchaka
2013-04-20 20:33:23pitrousetmessageid: <1366490003.51.0.571307288216.issue17804@psf.upfronthosting.co.za>
2013-04-20 20:33:23pitroulinkissue17804 messages
2013-04-20 20:33:23pitroucreate