claudio canepa wrote:
pygame color slice difference between 1.8.0 and 1.8.1release ?
with pygame 1.8.1release the app BezierLoops
http://www.pygame.org/project/848/?release_id=1474
crashes with TypeError: sequence index must be integer, not 'slice'
when it tries to slice a pygame.color.Color instance
In the comments the author tells that he developed in 1.8.0 , so it
seems that there is a difference between 1.8.0 and 1.8.1
Intended ? Unintended ?
The new Color type lacks slice support. Personally I am unsure what to
make of this. Tuples have been the de facto color type. Yet
pygame.color.Color was never documented as returning a tuple, just an
RGBA. A tuple was implied only because tuples where accepted as colors
by the Pygame functions, just as tuples are also accepted as a
rectangle. Color slicing is an undocumented feature. In fact, for Pygame
1.8 the pygame.color module is itself an undocumented feature.
--
Lenard Lindstrom
<[EMAIL PROTECTED]>