In the python documenation, it says:
Any function argument, no matter non-optional or optional (with default value) can be called as keyword argument as long as one of the argument names matches. Keyword argument, however, must follow all positional arguments.
I tried this out:
kwargs = {'step':-1, 'start':10, 'stop':5}
list(range(**kwargs))
But python gives men an error:
TypeError: range() takes no keyword arguments
Why is this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…