Set 4-byte 'value' at 'index'. See struct module's documentation to understand the meaning of 'order'.
(self, index, value, order = '!')
| 117 | return value |
| 118 | |
| 119 | def set_long(self, index, value, order = '!'): |
| 120 | "Set 4-byte 'value' at 'index'. See struct module's documentation to understand the meaning of 'order'." |
| 121 | index = self.__validate_index(index, 4) |
| 122 | ary = array.array("B", struct.pack(order + 'L', value)) |
| 123 | if -4 == index: |
| 124 | self.__bytes[index:] = ary |
| 125 | else: |
| 126 | self.__bytes[index:index+4] = ary |
| 127 | |
| 128 | def get_long(self, index, order = '!'): |
| 129 | "Return 4-byte value at 'index'. See struct module's documentation to understand the meaning of 'order'." |
no test coverage detected