set bits slice from start to end index (n-0) with the given value
(self, start, end, value)
| 23 | return ((self._d >> start) & mask) |
| 24 | |
| 25 | def __setslice__(self, start, end, value): |
| 26 | "set bits slice from start to end index (n-0) with the given value" |
| 27 | mask = 2**(end - start + 1) -1 |
| 28 | value = (value & mask) << start |
| 29 | mask = mask << start |
| 30 | self._d = (self._d & ~mask) | value |
| 31 | return (self._d >> start) & mask |
| 32 | |
| 33 | def __int__(self): |
| 34 | "add de int() function for bf" |