[Tutor] How many types of the constructor

sudhanshu gautam sudhanshu9252 at gmail.com
Mon Apr 27 19:08:30 CEST 2009


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__ is a constructor in which we do not need to call the function
separately .

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

ragards
sudhanshu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090427/5cc6cb02/attachment.htm>


More information about the Tutor mailing list