I have a static class with a list of "colors" defined as fields. But each color is actually a time dependent function:
class Colors(object):
@staticmethod
def RED(t):
return [255 * t, 0, 0]
Then, I have another class that will have these functions as fields:
class PathMaker(object):
SUCCESS_COLOR = Colors.BLUE
FAIL_COLOR = Colors.RED
But now, PathMaker.FAIL_COLOR is an unbound method, instead of a reference to Colors.RED.
Is there a better way of doing this? I could probably make SUCCESS_COLOR and FAIL_COLOR static methods, but that seems like a bad way of doing it.