The pack function needs a string as the format, which isn't consistent with
unpack and readlist, both of which will accept a (non-string) iterable.
This breaks symmetry between pack and unpack, for example you'd expect to be
able to do this:
fmt = ['hex:8', 'bin:3']
a = pack(fmt, '47', '001')
a.unpack(fmt)
but instead you would need to write
a = pack(','.join(fmt), '47', '001')
which is ugly for a number of reasons...
Original issue reported on code.google.com by dr.scott...@gmail.com on 28 Aug 2011 at 9:20
Original issue reported on code.google.com by
dr.scott...@gmail.com
on 28 Aug 2011 at 9:20