Since I just switched to Python from C++, I feel like python does not care much about type safety. For example, can anyone explain to me why checking the types of function parameters is not necessary in Python?
Say I defined a Vector class as follows:
class Vector:
def __init__(self, *args):
# args contains the components of a vector
# shouldn't I check if all the elements contained in args are all numbers??
And now I want to do dot product between two vectors, so I add another function:
def dot(self,other):
# shouldn't I check the two vectors have the same dimension first??
....