Re: [Tutor] How many types of the constructor

2009-04-27 Thread Alan Gauld
"sudhanshu gautam" wrote Now If I placed the name of the constructor rather than the __init__ __baba___ so will it also work as a constructor or constructor has specified already if yes then give me list of them Unlike some other OOP languages Python only has one constructor (OK As Denis po

Re: [Tutor] How many types of the constructor

2009-04-27 Thread spir
Le Mon, 27 Apr 2009 22:38:30 +0530, sudhanshu gautam s'exprima ainsi: > Now If I placed the name of the constructor rather than the __init__ > __baba___ so will it also work as a constructor or constructor has specified > already if yes then give me list of them Actually __init__ is not the con

Re: [Tutor] How many types of the constructor

2009-04-27 Thread Emile van Sebille
sudhanshu gautam wrote: Now If I placed the name of the constructor rather than the __init__ __baba___ so will it also work as a constructor or constructor has specified already if yes then give me list of them I'm not sure I parsed your question as you intended, but __init__ is pretty much

Re: [Tutor] How many types of the constructor

2009-04-27 Thread Noufal Ibrahim
Greetings Sudanshu, sudhanshu gautam wrote: when we work on the oops in the python then we have to pass the first parameter as a self then the value of the other parameters . Well, not explicitly. If you're familiar with OOPS in C++, self is analogous to the "this" pointer there. Also, you ne

[Tutor] How many types of the constructor

2009-04-27 Thread sudhanshu gautam
when we work on the oops in the python then we have to pass the first parameter as a self then the value of the other parameters . for example: class Student: def __init__(self,name): self.name=name print 'The name is',self.name a=student('sudhanshu') a is an object of the student class so __init