Closed GoogleCodeExporter closed 9 years ago
Note that this is not always the case, so it definitely seems to be a bug.
>>> from bitstring import BitArray
>>> a = BitArray(bin='0')
>>> b = BitArray(bin='1')
>>> a + b
BitArray('0b01')
>>> a + b
BitArray('0b01')
>>> a + b
BitArray('0b01')
Original comment by gerardl...@gmail.com
on 16 Mar 2013 at 5:26
Thanks - it doesn't appear to be a new bug in 3.1.0 so I'm rather surprised no
one has reported it before. I'll get a fix out fairly soon.
Original comment by dr.scott...@gmail.com
on 16 Mar 2013 at 5:57
Fixed in r. 970. The bug was related to not using an explicit copy when
constructing an immutable type, which returned a cached bitstring as an
optimisation and was then modified. Problem only occurred when the second
argument to the add was longer than the first.
Original comment by dr.scott...@gmail.com
on 20 Mar 2013 at 3:37
Original issue reported on code.google.com by
gerardl...@gmail.com
on 16 Mar 2013 at 5:23