a way to avoid this in python that i quite like is to require keyword arguments:
def foo(*, x, y):
pass
# you must do this
foo(x=5, y=6)
# you cannot do this
foo(5,6)
# and therefore you also may not
foo(6,5)
This is a little autocratic but the other nice thing is that if you’re finding it really painful to use it means you should probably refactor anyway.