On Sun, Apr 19, 2020 at 02:10:21PM +0200, Alex Hall wrote:
> >
> > And notice that there is absolutely no difficulty with some future
> > enhancement to allow positional arguments after keyword arguments.
> >
>
> We've already discussed in this thread that we shouldn't fear conflicting
> with other (real or hypothetical) proposals, even if they're likely. As I
> see it, the chance of allowing positional arguments after keyword arguments
> is basically zero. The restriction is intentionally there for a good reason.
Python already allows positional arguments after keyword
arguments:
py> sorted(reverse=True, *([1, 4, 2, 3],))
[4, 3, 2, 1]
Haha, that's very clever. I had to think for a bit about why that's allowed. So let me specify: we don't allow non-variadic positional arguments after keyword arguments, and I don't think we ever will or should.
I have an actual, concrete possible enhancement in mind: relaxing the
restriction on parameter order.
What? Do you think that the current restriction is bad, and we should just drop it? Why?