I want a string with one additional attribute, let's say whether to print it in red or green.
Subclassing(str) does not work, as it is immutable. I see the value, but it can be annoying.
Can multiple inheritence help? I never used that.
Inheriting only object and using self.value=str means I have to implement all string-ness messages (like strip) myself.
Or is there a way to forward them, like Ruby's missing_method?
I think using a class-level dictionary indexed by instance to store the color could work. Too ugly?