On Mon, Apr 20, 2020 at 2:48 AM Steven D'Aprano <st...@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.
> > >
> >
> > 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?
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/BJWY3UPHNPMWWE7X7C3TE7QIIFKP6ZZQ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to