class Foo(object): @apply def x( ): def fget(self): return self.__x def fset(self, value): self.__x = value return property(**locals( ))