pygame-ce icon indicating copy to clipboard operation
pygame-ce copied to clipboard

Add `Color.copy()` and `Color.__copy__()` methods

Open aatle opened this issue 3 months ago • 2 comments
trafficstars

Mutable collections almost always have a .copy() method. It can be faster and more direct than using the (overloaded) constructor to copy.

__copy__ should also be added, for a more efficient copy.copy(). (note it is already supported via the copyreg registration used for color pickling.)

aatle avatar Aug 05 '25 08:08 aatle