I have a code in python3 and I don't know why the first call doesn't have an error but the second one has?
def one_star_type(a, b, *more):
print(a + b + sum(more))
print(type(more)) # <class 'tuple'>
one_star_type(1, 2, 3, 4, 5)
def one_star_type(a, b, **c):
print(a, b, c)
print(type(c))
def should_set_value(a, *, b=2, c=5):
print(a, b, c)
one_star_type(1, 2, 3, 4, 5)
//one_star_type(1, 2, 3, 4, 5)
//TypeError: one_star_type() takes 2 positional arguments but 5 were given
//15
//<class 'tuple'>