Re: what is the difference between @property and method

2012-02-10 Thread Zheng Li
Thank you On 2012/02/10, at 0:36, John Posner wrote: > On 2:59 PM, Devin Jeanpierre wrote: > > >> It is kind of funny that the docs don't ever explicitly say what a >> property is. http://docs.python.org/library/functions.html#property -- >> Devin > > Here's a writeup that does: > http://wiki

Re: what is the difference between @property and method

2012-02-09 Thread Terry Reedy
On 2/9/2012 10:36 AM, John Posner wrote: On 2:59 PM, Devin Jeanpierre wrote: It is kind of funny that the docs don't ever explicitly say what a property is. http://docs.python.org/library/functions.html#property -- Devin Here's a writeup that does: http://wiki.python.org/moin/AlternativeDesc

Re: Re: what is the difference between @property and method

2012-02-09 Thread John Posner
On 2:59 PM, Devin Jeanpierre wrote: > It is kind of funny that the docs don't ever explicitly say what a > property is. http://docs.python.org/library/functions.html#property -- > Devin Here's a writeup that does: http://wiki.python.org/moin/AlternativeDescriptionOfProperty -John -- http://m

Re: what is the difference between @property and method

2012-02-09 Thread Devin Jeanpierre
On Thu, Feb 9, 2012 at 3:50 AM, Zheng Li wrote: > class A(object): >@properymethod >def value1(self): > return 'value1' > >def value2(self): >return 'value2' > > what is the difference between value1 and value2. There is no such thing as @properymethod After you chang