"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
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
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
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
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