We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ce2d2d commit 97a447cCopy full SHA for 97a447c
adafruit_ws2801.py
@@ -144,14 +144,14 @@ def __getitem__(self, index):
144
out = []
145
for in_i in range(*index.indices(self._n)):
146
out.append(
147
- tuple(self._buf[in_i * 3 + (2 - i)] for i in range(3)))
+ tuple(self._buf[in_i * 3 + i] for i in range(3)))
148
return out
149
if index < 0:
150
index += len(self)
151
if index >= self._n or index < 0:
152
raise IndexError
153
offset = index * 3
154
- return tuple(self._buf[offset + (2 - i)] for i in range(3))
+ return tuple(self._buf[offset + i] for i in range(3))
155
156
def __len__(self):
157
return self._n
0 commit comments