To create 100 zero bits you can use
a = BitArray(100)
This is fine, but it can get confusing when initialising with an int is used
outside the constructor.
>>> a = BitArray([0])
>>> a == 1
True
>>> a += 1 # adds a zero bit to the end
>>> a += 0 # does nothing
Suggest that this auto initialisation be disallowed. Even I sometimes get
confused by this and I wrote it...
Original issue reported on code.google.com by dr.scott...@gmail.com on 29 May 2011 at 4:07
Original issue reported on code.google.com by
dr.scott...@gmail.com
on 29 May 2011 at 4:07