Which worked in Python2 but gave a IO exeption in Python3 because map returns an iterator/gererator but not a list in this case. spidev complained that max bytes was exceeded. Maybe it checked the length of the generator code.
With the suggested code it might check the length of a list (I'm not a C++ dev)
Interesting- I know I'm late to the party here, but have you built a version fix this tweak and tested it at all? It seems sane enough to me, although my Python/C binding knowledge is patchy at best.
Had the following code:
spi.writebytes(map(lambda rgb: gamma[rgb], __rgb_leds))
Which worked in Python2 but gave a IO exeption in Python3 because map returns an iterator/gererator but not a list in this case. spidev complained that max bytes was exceeded. Maybe it checked the length of the generator code.
With the suggested code it might check the length of a list (I'm not a C++ dev)