Update: in python-bitstring 3.0.0 step has the conventional meaning
I am using python bitstring, I have a ConstBitArray loaded from file and I would like to get a slice with a step different from 1.
In a normal list I just would do:
s = mylist[start:stop:step]
however bitstring has a strange definition for stepping, see:
http://packages.python.org/bitstring/slicing.html#stepping-in-slices
does somebody knows how to do that?
thanks
It’s quite clear in the link you provided that they have chosen to make
mylist[start:stop:step]syntactic sugar formylist[start*step:stop*step]which unfortunately means you won’t be able to use the step in the usual wayYou could try something list this as a replacement