scott-griffiths / bitstring

A Python module to help you manage your bits
https://bitstring.readthedocs.io/en/stable/index.html
MIT License
404 stars 68 forks source link

Add trailing_bits to other pretty print #279

Closed scott-griffiths closed 5 months ago

scott-griffiths commented 1 year ago

Currently pp() can give an exception at the end of printing if the number of bits isn't an exact multiple of the format(s). So for long bitstrings that can be after many lines have been printed.

I think we can copy what pp() does for the Array class and add a ' + trailing_bits' to the end if bits are left over.

scott-griffiths commented 5 months ago

Should be working OK in 4.2.