On Tue, Nov 9, 2021 at 12:27 PM Terry Reedy <tjre...@udel.edu> wrote:

> On 11/9/2021 1:52 PM, Sebastian Rittau wrote:
> > Am 09.11.21 um 19:26 schrieb Terry Reedy:
> >> The signature of Sebastian's function with honest parameter names is
> >> foo(x_or_y, required_y=_NotGiven, /).  It is the 2nd argument, not the
> >> first, that is optional, as with range.  If required_y is not given,
> >> than x_or_y must be y, and x is given a default that is not part of
> >> the signature because it is explicitly bound when called. If
> >> required_y *is* given, then x_or_y can be x.
> >
> > Just to clarify: This proposal works differently than how range() works.
> > foo(3) would be illegal as the required second parameter ("y") is
> > missing.
>
> No it is not.  If there is one required positional parameter and one
> supplies one positional argument, then that argument must be bound to
> that parameter name.
>

Terry, maybe that is *your* proposal. But Sebastian's proposal works like
he describes. You can argue that there is a problem with those semantics,
but you cannot argue that that is not what Sebastian proposes. And please
remain civil.

-- 
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/PLS4NSRGS3CANFHM6QGHASBSHZEXPYYV/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to