I have been learning some basics of OOP in Python and I found that it does not allow multiple constructors on it. However, I have tried the following code:
class Whatever:
def __init__(self,x=0,y=0):
self.x=x
self.y=y
def Whatever(self,x,y):
self.x=x
self.y=y
and when I execute it, this works just as multiple constructors:
c=Whatever()
print c.x,c.y
0,0
d=Whatever(1,2)
print d.x,d.y
1,2
is this fine to build multiple constructors in Python?