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

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -