
On Mon, Apr 20, 2020 at 12:57 PM Steven D'Aprano <steve@pearwood.info> wrote:
On Mon, Apr 20, 2020 at 11:15:32AM +0200, Alex Hall wrote:
On Mon, Apr 20, 2020 at 2:48 AM Steven D'Aprano <steve@pearwood.info> wrote:
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.
[...]
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?
No, I have no opinion at the moment on whether we should relax that restriction. I'm saying that the mode-shift suggestion:
func(arg, name=value, *, # change to auto-fill mode alpha, beta, gamma, )
will rule out any further relaxation on that restriction, and that is a point against it. That's a concrete enhancement that we might allow some time. Whether *I personally* want that enhancement is irrelevant.
You on the other hand, claim that my suggestion:
func(arg, name=value, **{alpha, beta, gamma}, )
will also rule out some unspecified, unknown, unimagined future enhancements. I'm saying that's a weak argument, unless you have a specific enhancement in mind.
No I'm not claiming anything close to that. We're misunderstanding each other quite badly. We're both talking about possible enhancements involving allowing non-variadic positional-looking arguments after unpacked keyword arguments: A: make them auto-named B: simply allow them and interpret them as positional arguments C: something we haven't thought of yet D: something else we haven't thought of yet I thought you were against A because it would block out C, and I was saying that following that logic when we eventually think of C it isn't gonna happen either because it will block out D. Since you say that ruling out unimagined future enhancements is a weak argument, I take it to mean that I misunderstood and you weren't arguing against A because of C, but rather because of B. Now that I think we've cleared that up: B is a terrible idea, and if anyone is considering it, I'd support A for no other reason than to prevent B from happening.