Learn to use MultipleDispatch with Init Methods.
class Point:
x = 0
y = 0
@dispatch()
def __init__(self):
self.x = 10
self.y = 10
print("No argument constructor")
@dispatch(int)
def __init__(self,x):
self.x = x
@dispatch(int, int)
def __init__(self, x, y):
self.x = x
self.y = y
print("Creating New Object..")
--------------------------------------------------------------
Learn Blazor Free: https://www.youtube.com/watch?v=ORT7f...
Learn Python Free: https://www.youtube.com/watch?v=1twx5...
Sql Server step by step: https://www.youtube.com/playlist?list...
👇 To Subscribe!!
/ ziaahmedshaikh
👇 For more details check out my Website:
http://www.ziaahmedshaikh.com/
Please show your love and support by liking and subscribing to the channel so I can grow a strong and powerful community 💓
Activate the 🔔 beside the subscribe button to get the notification!📩 If you have any questions or requests feel free to leave them in the comments below.
#python #pythonprogramming #pythontutorial