what is the difference between @property and method

Zheng Li dllizheng at gmail.com
Thu Feb 9 03:50:38 EST 2012


class A(object):
    @properymethod
    def value1(self):
         return 'value1'

    def value2(self):
        return 'value2'

what is the difference between value1 and value2.



More information about the Python-list mailing list