Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #20059 > unrolled thread

what is the difference between @property and method

Started byZheng Li <dllizheng@gmail.com>
First post2012-02-09 17:50 +0900
Last post2012-02-09 17:50 +0900
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  what is the difference between @property and method Zheng Li <dllizheng@gmail.com> - 2012-02-09 17:50 +0900

#20059 — what is the difference between @property and method

FromZheng Li <dllizheng@gmail.com>
Date2012-02-09 17:50 +0900
Subjectwhat is the difference between @property and method
Message-ID<mailman.5575.1328777445.27778.python-list@python.org>
class A(object):
    @properymethod
    def value1(self):
         return 'value1'

    def value2(self):
        return 'value2'

what is the difference between value1 and value2.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web