Aug-07-2020, 03:19 PM
I suppose if keyword arguments were allowed before positional ones, there could be ambiguity. Consider
If you write
(I might not be thinking this through entirely, but that was my first thought)
def foo(bar=1, baz): pass
If you write
foo("qux")
, what does that mean? Would it be passing a value for baz
(using the default for bar
), or passing a value for bar
?(I might not be thinking this through entirely, but that was my first thought)