Sat 14 November 2009

class Spam(object):
    def __init__(self, value):
        self.value = value

    @property
    def spam(self):
        return self.value

    @spam.setter
    def spam(self, value):
        self.value = value

spam = Spam(42)
print spam.spam
spam.spam = 23
print spam.spam