Message187455
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. |
|
| Date |
User |
Action |
Args |
| 2013-04-20 20:33:23 | pitrou | set | recipients:
+ pitrou, mark.dickinson, meador.inge, serhiy.storchaka |
| 2013-04-20 20:33:23 | pitrou | set | messageid: <[email protected]> |
| 2013-04-20 20:33:23 | pitrou | link | issue17804 messages |
| 2013-04-20 20:33:23 | pitrou | create | |
|