Shared objects in Python -
i have few objects, should have shared fields. of them may strings or other immutables. how can share them in best way? variant write container manually.
class shared(object): def __init__(self, what_to_share): self.inner_value = what_to_share @property def value(self): return self.inner_value @value.setter def value(self, new_value): self.inner_value = new_value
Comments
Post a Comment