Sep-09-2017, 10:54 PM
def test(a, b='test'): print(a) print(b) def test2(a, *, b='test'): print(a) print(b) test('hello', 'world') test2('hello', b='world')If you write: test2('hello', 'world')
you get: TypeError: test2() takes 1 positional argument but 2 were given
https://www.python.org/dev/peps/pep-3102/