a.pp('b,h') # binary then hex, but using the shorter notation from #237
a.pp('u8') # convert each 8 bits to unsigned ints and display one int per group
a.pp('hex:32, float') # 4 bytes of hex in each group in first column, float32 in second column
a.pp('b7, i') # 7 bits of binary in each group in first column, signed int for each group in second column
If #237 is done then we need to allow the shorter name here.
Allowing widths in the format string is nice idea. It clashes with the bits_per_group option, but might be a much better way of specifying it. It could also allow different bits_per_group for each column, although that sounds like one huge edge case and might be best to disallow.
Probably should allow all of hex:16, hex16, h16 (and not h:16).
The bytes format stays as bytes and can't be shortened.
Would these make sense as additions to #231 ?
bits_per_group
option, but might be a much better way of specifying it. It could also allow different bits_per_group for each column, although that sounds like one huge edge case and might be best to disallow.hex:16
,hex16
,h16
(and noth:16
).bytes
and can't be shortened.