How about this syntax: def insort_right(a, x, lo=0, hi={len(a)}, *, key=None): …
Similar to the expression curly brackets in f-string. If the user didn’t specify a value for hi, the expression between the curly brackets will be evaluated and assigned to hi. Abdulla Sent from my iPhone > On 24 Oct 2021, at 4:46 PM, Ricky Teachey <ri...@teachey.org> wrote: > > > It seems to me that the syntax for late binding could be chosen so as to > leave the possibility of expansion open in the future, and defer (har har) > the entire generalized thunk discussion? > > So why not go with syntax like this, where before the ? just represents a > keyword to be bike shedded ("defer", "thunk", "later", "...."): > > def func(a, b=? a): ... > > I kind of like using the ellipses btw; it looks sort of like "later..." to > me: > > def func(a, b = ... a): > ... > > _______________________________________________ > 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/3F2I2N3OO2M34XYOR4SKCA2KQ4FFJBOK/ > Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ 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/PW3HDVAYG3GRFVQ3HGWE6ILPCNEKP2LJ/ Code of Conduct: http://python.org/psf/codeofconduct/