Re: What is a class method?

2010-08-24 Thread Jean-Michel Pichavant
Paulo da Silva wrote: Em 23-08-2010 04:30, James Mills escreveu: On Mon, Aug 23, 2010 at 12:49 PM, Paulo da Silva wrote: I understand the concept of a static method. However I don't know what is a class method. Would anybody pls. explain me? Please read this first:

Re: What is a class method?

2010-08-23 Thread Denis Gomes
John, I agree with you and I also think the definition given on the official python site is somewhat confusing, at least for an engineer like myself. But I'll take a stab at explaning it using what I know thus far. I think to understand what a class method is you have to first understand wha

Re: What is a class method?

2010-08-23 Thread Paulo da Silva
Em 23-08-2010 06:16, Ian Kelly escreveu: > On Sun, Aug 22, 2010 at 9:53 PM, Paulo da Silva > wrote: >> Em 23-08-2010 04:30, James Mills escreveu: >>> On Mon, Aug 23, 2010 at 12:49 PM, Paulo da Silva >>> wrote: >>>> I understand the concept of a static m

Re: What is a class method?

2010-08-22 Thread John Nagle
On 8/22/2010 9:16 PM, James Mills wrote: On Mon, Aug 23, 2010 at 1:53 PM, Paulo da Silva wrote: I did it before posting ... The "explanation" is not very clear. It is more like "how to use it". Without going into the semantics of languages basically the differences are quite clear: @classme

Re: What is a class method?

2010-08-22 Thread Terry Reedy
On 8/22/2010 11:53 PM, Paulo da Silva wrote: Please read this first: http://docs.python.org/library/functions.html#classmethod Then ask us questions :) I did it before posting ... When you ask a question, it help people answer if they know what you have already tried and failed with ;-)

Re: What is a class method?

2010-08-22 Thread Ian Kelly
On Sun, Aug 22, 2010 at 9:53 PM, Paulo da Silva wrote: > Em 23-08-2010 04:30, James Mills escreveu: >> On Mon, Aug 23, 2010 at 12:49 PM, Paulo da Silva >> wrote: >>> I understand the concept of a static method. >>> However I don't know what is a class met

Re: What is a class method?

2010-08-22 Thread James Mills
On Mon, Aug 23, 2010 at 1:53 PM, Paulo da Silva wrote: > I did it before posting ... > The "explanation" is not very clear. It is more like "how to use it". Without going into the semantics of languages basically the differences are quite clear: @classmethod is a decorator that warps a function

Re: What is a class method?

2010-08-22 Thread Paulo da Silva
Em 23-08-2010 04:30, James Mills escreveu: > On Mon, Aug 23, 2010 at 12:49 PM, Paulo da Silva > wrote: >> I understand the concept of a static method. >> However I don't know what is a class method. >> Would anybody pls. explain me? > > Please read this firs

Re: What is a class method?

2010-08-22 Thread James Mills
On Mon, Aug 23, 2010 at 12:49 PM, Paulo da Silva wrote: > I understand the concept of a static method. > However I don't know what is a class method. > Would anybody pls. explain me? Please read this first: http://docs.python.org/library/functions.html#classmethod Then as

What is a class method?

2010-08-22 Thread Paulo da Silva
I understand the concept of a static method. However I don't know what is a class method. Would anybody pls. explain me? class C: @classmethod def ... ... Thanks -- http://mail.python.org/mailman/listinfo/python-list