>>> a = BitArray('0x0000')
>>> a[[0, 2, 7]] = 1
>>> a[[0, 2, 7]]
BitArray('0b111')
>>> del a[[0, 2, 7]]
Certainly this should be used in the implementation of set. I think a[iterable] = value is equivalent to a.set(value, iterable so that's not extra functionality. But x = a[iterable] is new - does this suggest we're missing a a.get(iterable) -> BitArray for symmetry? Is del a[iterable] actually a useful thing to be able to do? Maybe.
A new feature looks to be going into bitarray, which we could either expose directly or utilise for a performance increase in some methods: https://github.com/ilanschnell/bitarray/pull/204
Certainly this should be used in the implementation of
set
. I thinka[iterable] = value
is equivalent toa.set(value, iterable
so that's not extra functionality. Butx = a[iterable]
is new - does this suggest we're missing aa.get(iterable) -> BitArray
for symmetry? Isdel a[iterable]
actually a useful thing to be able to do? Maybe.