Just curious, Is it possible to keep static attrs in a class that returns instantiated objects for the same class? Specifically not using a factory method but attr
class Money:
CENT = Money('cent')
def __init__(self, value):
self.value = value
Money.CENT #==> Returns Money('cent')
The best I could come up with is, But not within the same class.
class SampleMoney:
CENT = Money('cent')
DOLLAR = Something('dollar')
SampleMoney.CENT #==> Money('cent')
Something.EMPTY = Something('empty')after the class definiton.