It seems to me that you are looking for an implementation of the Flyweight pattern in Python?
There even seems to be some special syntax in Python for it, __slots__, but I don't usually write Python, so I'm not sure.
There even seems to be some special syntax in Python for it, __slots__, but I don't usually write Python, so I'm not sure.