I have a class like this:
class Foo(object): def __init__(self): self.bar = property(self.get_bar) def get_bar(self): return \"bar\" pr
You can do it like this
class Foo(object): def __init__(self): self.__bar = None def get_bar(self): return self.__bar def set_bar(self, value): self.__bar = value bar = property(get_bar, set_bar) foo = Foo() print foo.bar # None foo.bar = 1 print foo.bar # 1