def pack(self,pack):
        "return bf with the given values in dec [n1, n2, n3...] packed"
        r=bf(); ss=0;pack.reverse()      
        for i in pack:
            l1=len(bin(i))-2
            r.__setslice__(ss,ss+l1,i)
            ss +=l1
        return  r
return bf with the given values in dec [n1, n2, n3...] packed
recipes/Python/578922_bitfield_rev2/recipe-578922.py