[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Color, unpacking to r,g,b and r,g,b,a - ValueError: too many values to unpack



René Dudfield wrote:

If it could unpack to 3, or 4 depending on the number of elements on
the left, I think I'd prefer that though.

That's not possible, because as far as the object is
concerned, it's just being iterated over. It has no
way of knowing that it's being unpacked, or how many
items are expected.

I think I'd go for the subtype.

--
Greg