def test_args_2(x, y, z): print(x, y, z)
When calling that function with :
test_args_2(4, y=4)
Python gives:
TypeError: test_args_2() missing 1 required positional argument: 'z'
z is missing but it's considered positional not a keyword one, why ?
if we modify the call by this:
test_args_2(4, y=5, 4)
Python gives:
SyntaxError: positional argument follows keyword argument
Why z is considered positional although in the second error message it's assumed keyword one?