Instead of current
>>> s = pack(...) # returns a BitString
make it return a Bits object.
Then have a method in BitString so that you can say
>>> s2 = BitString()
>>> s2.pack(...)
This allows either a Bits or BitString to be created, removing the current
asymmetry.
The packed data can be appended on to for BitStrings, allowing them to be
constructed in pieces.
>>> s2.pack('more stuff...')
So we'd have a pack function that returned a Bits, and a BitString.pack
method that modified in-place and returned None. Confusing? Maybe.
Original issue reported on code.google.com by python.bitstring@googlemail.com on 25 Mar 2010 at 3:39
Original issue reported on code.google.com by
python.bitstring@googlemail.com
on 25 Mar 2010 at 3:39