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 psdasilva.nos...@netcabonospam.pt wrote: I understand the concept of a static method. However I don't know what is a class method. Would anybody pls. explain me

Re: What is a class method?

2010-08-23 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 psdasilva.nos...@netcabonospam.pt 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

Re: What is a class method?

2010-08-23 Thread Paulo da Silva
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 ask us questions :) I did it before posting ... The explanation is not very clear. It is more like how to use

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

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

Re: What is a class method?

2010-08-22 Thread James Mills
On Mon, Aug 23, 2010 at 12:49 PM, Paulo da Silva psdasilva.nos...@netcabonospam.pt 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

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 psdasilva.nos...@netcabonospam.pt 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

Re: What is a class method?

2010-08-22 Thread James Mills
On Mon, Aug 23, 2010 at 1:53 PM, Paulo da Silva psdasilva.nos...@netcabonospam.pt 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

Re: What is a class method?

2010-08-22 Thread Ian Kelly
is a class method. Would anybody pls. explain me? Please read this first: http://docs.python.org/library/functions.html#classmethod Then ask us questions :) I did it before posting ... The explanation is not very clear. It is more like how to use it. Consider this: class A(object

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 ;-)