Re: Functions associated with a class.

2008-07-01 Thread Bruno Desthuilliers
Kurda Yon a écrit : Hi, I start to learn the object oriented programing in Python. As far as I understood, every class has a set of corresponding methods and variables. Every object has a set of attributes. Some of these attributes are methods (which are thmeselves objects too), some are

Functions associated with a class.

2008-06-30 Thread Kurda Yon
Hi, I start to learn the object oriented programing in Python. As far as I understood, every class has a set of corresponding methods and variables. For me it is easy to understand a method as a one-argument function associated with a class. For example, if I call x.calc and y.calc and if x and y

Re: Functions associated with a class.

2008-06-30 Thread John Machin
On Jul 1, 9:44 am, Kurda Yon [EMAIL PROTECTED] wrote: Hi, I start to learn the object oriented programing in Python. As far as I understood, every class has a set of corresponding methods and variables. For me it is easy to understand a method as a one-argument function associated with a

Re: Functions associated with a class.

2008-06-30 Thread Larry Bates
Kurda Yon wrote: Hi, I start to learn the object oriented programing in Python. As far as I understood, every class has a set of corresponding methods and variables. For me it is easy to understand a method as a one-argument function associated with a class. For example, if I call x.calc and

Re: Functions associated with a class.

2008-06-30 Thread Hongster
Like what you mentioned, each class has a set of methods and properties (variables). Example of a class: Human Properties of a Human class: height, weight, birthday, occupation, ... Methods of a Human class: eat(food), move(speed, destination), sleep(), ... Methods of a class is just an ordinary